Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


fengguang.wu at intel

Jul 28, 2012, 4:45 AM

Post #1 of 3 (65 views)
Permalink
[PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK

Fix coccinelle warning (without behavior change):

drivers/block/floppy.c:2518:32-48: duplicated argument to & or |

Signed-off-by: Fengguang Wu <fengguang.wu [at] intel>
---

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 553f43a..0fcbe14 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -2516,8 +2516,7 @@ static int make_raw_rw_request(void)
set_fdc((long)current_req->rq_disk->private_data);

raw_cmd = &default_raw_cmd;
- raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_DISK | FD_RAW_NEED_DISK |
- FD_RAW_NEED_SEEK;
+ raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_DISK | FD_RAW_NEED_SEEK;
raw_cmd->cmd_count = NR_RW;
if (rq_data_dir(current_req) == READ) {
raw_cmd->flags |= FD_RAW_READ;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


joe at perches

Jul 28, 2012, 8:04 AM

Post #2 of 3 (61 views)
Permalink
Re: [PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK [In reply to]

On Sat, 2012-07-28 at 19:45 +0800, Fengguang Wu wrote:
> FD_RAW_NEED_DISK | FD_RAW_NEED_DISK

That's a pretty old defect from kernel 1.1 days.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jkosina at suse

Jul 31, 2012, 2:39 AM

Post #3 of 3 (61 views)
Permalink
Re: [PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK [In reply to]

On Sat, 28 Jul 2012, Fengguang Wu wrote:

> Fix coccinelle warning (without behavior change):
>
> drivers/block/floppy.c:2518:32-48: duplicated argument to & or |
>
> Signed-off-by: Fengguang Wu <fengguang.wu [at] intel>
> ---
>
> diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
> index 553f43a..0fcbe14 100644
> --- a/drivers/block/floppy.c
> +++ b/drivers/block/floppy.c
> @@ -2516,8 +2516,7 @@ static int make_raw_rw_request(void)
> set_fdc((long)current_req->rq_disk->private_data);
>
> raw_cmd = &default_raw_cmd;
> - raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_DISK | FD_RAW_NEED_DISK |
> - FD_RAW_NEED_SEEK;
> + raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_DISK | FD_RAW_NEED_SEEK;
> raw_cmd->cmd_count = NR_RW;
> if (rq_data_dir(current_req) == READ) {
> raw_cmd->flags |= FD_RAW_READ;

Now that's a funny one. Applied, thanks.

--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.