From: Dan Carpenter <dan.carpenter@oracle.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: "Shirish Gajera" <gshirishfree@gmail.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
kirk@reisers.ca, "Rusty Russell" <rusty@rustcorp.com.au>,
vthakkar1994@gmail.com, "Greg KH" <gregkh@linuxfoundation.org>,
"DaeSeok Youn" <daeseok.youn@gmail.com>,
"Robin Schroer" <sulamiification@gmail.com>,
speakup@linux-speakup.org,
"Ayşe Melike Yurtoğlu" <aysemelikeyurtoglu@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"Ben Hutchings" <ben@decadent.org.uk>,
"Domagoj Tršan" <domagoj.trsan@gmail.com>,
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.
Date: Mon, 30 Mar 2015 10:23:00 +0300 [thread overview]
Message-ID: <20150330072300.GB10964@mwanda> (raw)
In-Reply-To: <CAFLxGvyG0nAF=+g=OusJj79BO1iFiU=E2w-0_Vyz2djHv1_=Sg@mail.gmail.com>
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
next prev parent reply other threads:[~2015-03-30 7:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-28 20:21 [PATCH] staging: speakup: Fix warning of line over 80 characters Shirish Gajera
2015-03-28 20:40 ` Richard Weinberger
2015-03-28 21:18 ` Joe Perches
2015-03-28 21:22 ` Richard Weinberger
2015-03-28 21:35 ` Joe Perches
2015-03-28 23:44 ` Shirish Gajera
2015-03-28 23:54 ` Richard Weinberger
2015-03-29 0:26 ` Shirish Gajera
2015-03-29 9:28 ` Richard Weinberger
2015-03-30 6:17 ` Sudip Mukherjee
2015-03-30 7:23 ` Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-01-18 7:57 Shirish Gajera
2015-01-18 8:29 ` Robin Schroer
2015-01-19 12:19 ` Dan Carpenter
2015-01-18 9:55 ` Ben Hutchings
2015-01-19 12:25 ` Dan Carpenter
[not found] ` <CAG77vrrbEmw7OR8N7bcmKEkDwXonsfmJeE6-epYxSMLT5uQpMw@mail.gmail.com>
2015-01-19 20:26 ` Dan Carpenter
2015-01-19 12:23 ` Dan Carpenter
2015-01-25 11:37 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150330072300.GB10964@mwanda \
--to=dan.carpenter@oracle.com \
--cc=aysemelikeyurtoglu@gmail.com \
--cc=ben@decadent.org.uk \
--cc=chris@the-brannons.com \
--cc=daeseok.youn@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=dilekuzulmez@gmail.com \
--cc=domagoj.trsan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=gshirishfree@gmail.com \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.weinberger@gmail.com \
--cc=roxanagabriela10@gmail.com \
--cc=rusty@rustcorp.com.au \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.org \
--cc=sulamiification@gmail.com \
--cc=tapaswenipathak@gmail.com \
--cc=vthakkar1994@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).