From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752883AbbC3HXZ (ORCPT ); Mon, 30 Mar 2015 03:23:25 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:24533 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbbC3HXW (ORCPT ); Mon, 30 Mar 2015 03:23:22 -0400 Date: Mon, 30 Mar 2015 10:23:00 +0300 From: Dan Carpenter To: Richard Weinberger Cc: Shirish Gajera , "devel@driverdev.osuosl.org" , kirk@reisers.ca, Rusty Russell , vthakkar1994@gmail.com, Greg KH , DaeSeok Youn , Robin Schroer , speakup@linux-speakup.org, =?utf-8?Q?Ay=C5=9Fe_Melike_Yurto=C4=9Flu?= , LKML , Ben Hutchings , Domagoj =?utf-8?B?VHLFoWFu?= , roxanagabriela10@gmail.com, tapaswenipathak@gmail.com, samuel.thibault@ens-lyon.org, dilekuzulmez@gmail.com, chris@the-brannons.com Subject: Re: [PATCH] staging: speakup: Fix warning of line over 80 characters. Message-ID: <20150330072300.GB10964@mwanda> References: <20150328202139.GA12695@shirish-ThinkPad-Edge-E430> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 28, 2015 at 09:40:05PM +0100, Richard Weinberger wrote: > > diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c > > index 1249f91..c955976 100644 > > --- a/drivers/staging/speakup/main.c > > +++ b/drivers/staging/speakup/main.c > > @@ -423,7 +423,8 @@ static void announce_edge(struct vc_data *vc, int msg_id) > > if (spk_bleeps & 1) > > bleep(spk_y); > > if ((spk_bleeps & 2) && (msg_id < edge_quiet)) > > - synth_printf("%s\n", spk_msg_get(MSG_EDGE_MSGS_START + msg_id - 1)); > > + synth_printf("%s\n", > > + spk_msg_get(MSG_EDGE_MSGS_START + msg_id - 1)); > > Instead of blindly adding newlines to silence checkpatch.pl, what > about reworking the code? > printf("%s\n", ..) cries for a puts(). printf is fine. Not everything has to be a massive engineering project which supports every method in the world. > > > } > > > > static void speak_char(u_char ch) > > @@ -1131,7 +1132,8 @@ static void spkup_write(const char *in_buf, int count) > > if (in_count > 2 && rep_count > 2) { > > if (last_type & CH_RPT) { > > synth_printf(" "); > > - synth_printf(spk_msg_get(MSG_REPEAT_DESC2), ++rep_count); > > + synth_printf(spk_msg_get(MSG_REPEAT_DESC2), > > + ++rep_count); > > synth_printf(" "); > > This printf stuff looks odd. synth_printf() seems to take a format > string, in this case the format string > is returned by spk_msg_get(), smells like a format string bug. It's not a bug, but it's definitely odd. I think the reason they did it that way is so they can translate the output to other languages. Anyway, this patch is basically fine. regards, dan carpenter