mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "SL Baur" <steve@xemacs.org>
To: "Roel Kluin" <12o3l@tiscali.nl>
Cc: "Greg KH" <greg@kroah.com>,
	linux-usb@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mos7840: test and propagate set_uart_reg return value
Date: Wed, 16 Apr 2008 23:58:19 -0700	[thread overview]
Message-ID: <ed10ee420804162358k416bb443lf7c95892d84e75d2@mail.gmail.com> (raw)
In-Reply-To: <4806CF18.2050403@tiscali.nl>

On 4/16/08, Roel Kluin <12o3l@tiscali.nl> wrote:
> The test for an mos7840_set_uart_reg() error return value only works when
>  status is signed. propagate its error value.
>
>  Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
>  ---
>
>  diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
>  index aeeb9cb..ef1ede2 100644
>  --- a/drivers/usb/serial/mos7840.c
>  +++ b/drivers/usb/serial/mos7840.c
>  @@ -1713,7 +1713,7 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file,
>   {
>         struct moschip_port *mos7840_port;
>         unsigned int mcr;
>  -       unsigned int status;
>  +       int status;
>
>         dbg("%s - port %d", __FUNCTION__, port->number);
>
>  @@ -1739,11 +1739,10 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file,
>
>         mos7840_port->shadowMCR = mcr;
>
>  -       status = 0;
>         status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, mcr);
>         if (status < 0) {
>                 dbg("setting MODEM_CONTROL_REGISTER Failed\n");
>  -               return -1;
>  +               return status;
>         }
>
>         return 0;

O.K.  I can see you're changing types to properly match the function return
values.  May I ask why you didn't change mos7840_tiocmget the same way?

-sb

  reply	other threads:[~2008-04-17  6:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17  4:16 Roel Kluin
2008-04-17  6:58 ` SL Baur [this message]
2008-04-28 23:53 ` patch usb-mos7840-test-and-propagate-set_uart_reg-return-value.patch added to gregkh-2.6 tree gregkh
2008-04-29  6:31   ` SL Baur
2008-04-29  6:51     ` Greg KH
2008-04-29  7:33       ` SL Baur
2008-04-30  6:03         ` Greg KH
2008-05-01  1:56           ` SL Baur

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=ed10ee420804162358k416bb443lf7c95892d84e75d2@mail.gmail.com \
    --to=steve@xemacs.org \
    --cc=12o3l@tiscali.nl \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®