* [PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK
@ 2012-07-28 11:45 Fengguang Wu
2012-07-28 15:04 ` Joe Perches
2012-07-31 9:39 ` Jiri Kosina
0 siblings, 2 replies; 3+ messages in thread
From: Fengguang Wu @ 2012-07-28 11:45 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Joe Perches, LKML
Fix coccinelle warning (without behavior change):
drivers/block/floppy.c:2518:32-48: duplicated argument to & or |
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK
2012-07-28 11:45 [PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK Fengguang Wu
@ 2012-07-28 15:04 ` Joe Perches
2012-07-31 9:39 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2012-07-28 15:04 UTC (permalink / raw)
To: Fengguang Wu; +Cc: Jiri Kosina, LKML
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK
2012-07-28 11:45 [PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK Fengguang Wu
2012-07-28 15:04 ` Joe Perches
@ 2012-07-31 9:39 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2012-07-31 9:39 UTC (permalink / raw)
To: Fengguang Wu; +Cc: Joe Perches, LKML
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@intel.com>
> ---
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-31 9:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-28 11:45 [PATCH] floppy: remove duplicated flag FD_RAW_NEED_DISK Fengguang Wu
2012-07-28 15:04 ` Joe Perches
2012-07-31 9:39 ` Jiri Kosina
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).