public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	<linux-usb@vger.kernel.org>,
	<usb-storage@lists.one-eyed-alien.net>
Subject: Re: [PATCH] usb: storage: freecom: drop useless assignment in init_freecom()
Date: Thu, 7 Dec 2023 19:16:18 +0300	[thread overview]
Message-ID: <b96dc0cc-86da-425b-86b8-39566f594d83@omp.ru> (raw)
In-Reply-To: <2023120412-observing-affluent-9432@gregkh>

On 12/4/23 10:04 AM, Greg Kroah-Hartman wrote:
[...]
>> In init_freecom(), the results of usb_stor_control_msg() calls are stored
>> in the local variable and then printed out by usb_stor_dbg() (if enabled),
>> except for the 1st call, the result of which is completely ignored.  Drop
>> the useless assignment.
> 
> Instead, you should check the return value and handle it properly, don't
> just drop the checking entirely, that's not good.

   Hmm... I wonder if you'd actually read the patch...
   I'm not dropping any checking because there's none, even at the further
call sites of usb_stor_control_msg() -- the most init_freecom() currently
is doing is printing out the result of the calls...

> thanks,
> 
> greg k-h

MBR, Sergey

  reply	other threads:[~2023-12-07 16:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 20:43 [PATCH] usb: storage: freecom: drop useless assignment in init_freecom() Sergey Shtylyov
2023-12-04  7:04 ` Greg Kroah-Hartman
2023-12-07 16:16   ` Sergey Shtylyov [this message]
2024-01-22 18:26     ` Sergey Shtylyov
2024-01-22 18:53       ` Alan Stern

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=b96dc0cc-86da-425b-86b8-39566f594d83@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /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