Andrew Lunn wrote:
printk(KERN_ERR "batman-adv:Not using interface %s (retrying later):
interface not active\n", batman_if->dev); + printk(KERN_ERR "batman-adv:"
"Not using interface %s (retrying later): "
"interface not active\n", batman_if->dev);
Here i would of probably broken the line after %s to keep the rest together.
@@ -281,8 +287,9 @@ ssize_t orig_fill_buffer_text(struct net_device *net_dev, char *buff,
if (!bat_priv->primary_if) {
if (off == 0)
return sprintf(buff,
"BATMAN mesh %s disabled - please specify interfaces to
enable it\n", - net_dev->name);
"BATMAN mesh %s disabled - "
"please specify interfaces to enable it\n",
net_dev->name);
return 0;
}
How about combining to two if's into one, so reducing the indentation, and break the line after %s?
In this case it doesn't work because the line would be still to long.
@@ -290,7 +297,8 @@ ssize_t orig_fill_buffer_text(struct net_device *net_dev, char *buff,
if (bat_priv->primary_if->if_status != IF_ACTIVE) {
if (off == 0)
return sprintf(buff,
"BATMAN mesh %s disabled - primary interface not active\n",
"BATMAN mesh %s disabled - "
"primary interface not active\n", net_dev->name);
return 0;
Same again.
Changed
@@ -458,13 +469,16 @@ void receive_bat_packet(struct ethhdr *ethhdr,
if (is_my_addr) {
bat_dbg(DBG_BATMAN,
"Drop packet: received my own broadcast (sender: %pM)\n",
"Drop packet: received my own broadcast "
"(sender: %pM)\n",
I know it probably looks a little odd, but maybe break before %pM so the constant text is whole?
Done
if (is_broadcast) {
bat_dbg(DBG_BATMAN, "Drop packet: ignoring all packets with broadcast
source addr (sender: %pM)\n", ethhdr->h_source); + bat_dbg(DBG_BATMAN, "Drop packet: "
"ignoring all packets with broadcast source addr "
"(sender: %pM)\n", ethhdr->h_source);
Same again?
Done
if (is_my_oldorig) {
bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast echos
(sender: %pM)\n", ethhdr->h_source); + bat_dbg(DBG_BATMAN,
"Drop packet: ignoring all rebroadcast echos "
"(sender: %pM)\n", ethhdr->h_source);
Same again...
Doesn't fit
return;
}
@@ -508,12 +525,15 @@ void receive_bat_packet(struct ethhdr *ethhdr,
is_duplicate = count_real_packets(ethhdr, batman_packet, if_incoming);
if (is_duplicate == -1) {
bat_dbg(DBG_BATMAN, "Drop packet: packet within seqno protection time
(sender: %pM)\n", ethhdr->h_source); + bat_dbg(DBG_BATMAN,
"Drop packet: packet within seqno protection time "
"(sender: %pM)\n", ethhdr->h_source);
Probably does not fit this time :-(
Correct, doesn't fit.
diff --git a/send.c b/send.c index caec6ef..7f3031d 100644 --- a/send.c +++ b/send.c @@ -67,7 +67,8 @@ int send_skb_packet(struct sk_buff *skb,
if (!(batman_if->net_dev->flags & IFF_UP)) {
printk(KERN_WARNING
"batman-adv:Interface %s is not up - can't send packet via that
interface!\n", + "batman-adv:Interface %s is not up - "
"can't send packet via that interface!\n",
Maybe break after the %s?
Done
if (!bat_priv->primary_if) {
if (off == 0)
return sprintf(buff,
"BATMAN mesh %s disabled - please specify interfaces to
enable it\n", - net_dev->name);
"BATMAN mesh %s disabled - "
"please specify interfaces to enable it\n",
net_dev->name);
return 0;
Combine the two ifs and break on the %s?
Still too long.
The rest of the patch was renewed and submitted as
[PATCH-trunk 2/2v2] batman-adv: Reduce max characters on a line to 80 [PATCH-maint 2/2v2] batman-adv: Reduce max characters on a line to 80
Best regards, Sven