[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1105041201120.2039-100000@iolanthe.rowland.org>
Date: Wed, 4 May 2011 12:02:02 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Maxin John <maxin.john@...il.com>
cc: Michal Nazarewicz <mina86@...a86.com>, <gregkh@...e.de>,
<m-sonasath@...com>, <linux-usb@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <roger.quadros@...ia.com>
Subject: Re: [PATCH] usb: gadget: f_mass_storage: Remove the LUN check which
is always true
On Wed, 4 May 2011, Maxin John wrote:
> Hi Michal,
>
> > Acked-by: Michal Nazarewicz <mina86@...a86.com>
>
> Thank you very much for reviewing the patch.
>
> > file_storage.c has the same check, could you remove it as well.
>
> Please find the patch for "file_storage.c" below. Should I merge these
> two patches and re-submit as a single one?
>
> Signed-off-by: Maxin B. John <maxin.john@...il.com>
Acked-by: Alan Stern <stern@...land.harvard.edu>
> ---
> diff --git a/drivers/usb/gadget/file_storage.c
> b/drivers/usb/gadget/file_storage.c
> index a6eacb5..a9c5177 100644
> --- a/drivers/usb/gadget/file_storage.c
> +++ b/drivers/usb/gadget/file_storage.c
> @@ -2314,7 +2314,7 @@ static int check_command(struct fsg_dev *fsg,
> int cmnd_size,
> fsg->lun = lun; // Use LUN from the command
>
> /* Check the LUN */
> - if (fsg->lun >= 0 && fsg->lun < fsg->nluns) {
> + if (fsg->lun < fsg->nluns) {
> fsg->curlun = curlun = &fsg->luns[fsg->lun];
> if (fsg->cmnd[0] != REQUEST_SENSE) {
> curlun->sense_data = SS_NO_SENSE;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists