From: "Justin P. Mattock" <justinmattock@gmail.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net
Subject: Re: [PATCH] ieee1394: sbp2: remove unused code
Date: Mon, 14 Jun 2010 15:35:57 -0700 [thread overview]
Message-ID: <4C16AECD.50506@gmail.com> (raw)
In-Reply-To: <tkrat.6f2ad8e8a9e281c2@s5r6.in-berlin.de>
On 06/14/2010 02:44 PM, Stefan Richter wrote:
> which caused gcc 4.6 to warn about
> variable 'unit_characteristics' set but not used.
>
> The underlying problem that was spotted here --- an incomplete
> implementation --- is already 50% fixed in drivers/firewire/sbp2.c which
> observes mgt_ORB_timeout but not yet ORB_size.
>
> Reported-by: Justin P. Mattock<justinmattock@gmail.com>
> Signed-off-by: Stefan Richter<stefanr@s5r6.in-berlin.de>
> ---
> drivers/ieee1394/sbp2.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> Index: b/drivers/ieee1394/sbp2.c
> ===================================================================
> --- a/drivers/ieee1394/sbp2.c
> +++ b/drivers/ieee1394/sbp2.c
> @@ -1350,12 +1350,11 @@ static void sbp2_parse_unit_directory(st
> struct csr1212_keyval *kv;
> struct csr1212_dentry *dentry;
> u64 management_agent_addr;
> - u32 unit_characteristics, firmware_revision, model;
> + u32 firmware_revision, model;
> unsigned workarounds;
> int i;
>
> management_agent_addr = 0;
> - unit_characteristics = 0;
> firmware_revision = SBP2_ROM_VALUE_MISSING;
> model = ud->flags& UNIT_DIRECTORY_MODEL_ID ?
> ud->model_id : SBP2_ROM_VALUE_MISSING;
> @@ -1372,17 +1371,15 @@ static void sbp2_parse_unit_directory(st
> lu->lun = ORB_SET_LUN(kv->value.immediate);
> break;
>
> - case SBP2_UNIT_CHARACTERISTICS_KEY:
> - /* FIXME: This is ignored so far.
> - * See SBP-2 clause 7.4.8. */
> - unit_characteristics = kv->value.immediate;
> - break;
>
> case SBP2_FIRMWARE_REVISION_KEY:
> firmware_revision = kv->value.immediate;
> break;
>
> default:
> + /* FIXME: Check for SBP2_UNIT_CHARACTERISTICS_KEY
> + * mgt_ORB_timeout and ORB_size, SBP-2 clause 7.4.8. */
> +
> /* FIXME: Check for SBP2_DEVICE_TYPE_AND_LUN_KEY.
> * Its "ordered" bit has consequences for command ORB
> * list handling. See SBP-2 clauses 4.6, 7.4.11, 10.2 */
>
perfect!! compiled without any warning
with that one..
thanks for the reply and patch..
FWIW if you have time there's these guys as well
that I never looked at:
CC [M] drivers/firewire/core-transaction.o
drivers/firewire/core-transaction.c: In function 'fw_core_handle_response':
drivers/firewire/core-transaction.c:835:21: warning: variable
'destination' set but not used
CC [M] drivers/firewire/ohci.o
CC [M] drivers/ieee1394/raw1394.o
drivers/ieee1394/raw1394.c: In function 'arm_write':
drivers/ieee1394/raw1394.c:1018:39: warning: variable 'length_conflict'
set but not used
drivers/ieee1394/raw1394.c: In function 'arm_lock64':
drivers/ieee1394/raw1394.c:1373:11: warning: 'old' may be used
uninitialized in this function
drivers/ieee1394/raw1394.c: In function 'arm_lock':
drivers/ieee1394/raw1394.c:1155:12: warning: 'old' may be used
uninitialized in this function
CC [M] drivers/ieee1394/dv1394.o
drivers/ieee1394/dv1394.c: In function 'frame_prepare':
drivers/ieee1394/dv1394.c:613:15: warning: variable 'ts_off' set but not
used
drivers/ieee1394/dv1394.c: In function 'ir_tasklet_func':
drivers/ieee1394/dv1394.c:2007:22: warning: variable 'packet_time' set
but not used
drivers/ieee1394/dv1394.c: In function 'dv1394_host_reset':
drivers/ieee1394/dv1394.c:2323:18: warning: variable 'ohci' set but not used
CC [M] drivers/ieee1394/eth1394.o
drivers/ieee1394/eth1394.c: In function 'ether1394_iso':
drivers/ieee1394/eth1394.c:1261:23: warning: variable 'priv' set but not
used
LD drivers/ieee802154/built-in.o
I can test and see!!
Justin P. Mattock
next prev parent reply other threads:[~2010-06-14 22:35 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-14 20:26 [PATCH 0/8] Fix gcc 4.6.0 set but not used warning messages Justin P. Mattock
2010-06-14 20:26 ` Justin P. Mattock
2010-06-14 20:26 ` [PATCH 1/8]reiserfs:stree.c Fix variable set but not used Justin P. Mattock
2010-06-14 20:48 ` Nick Bowler
2010-06-14 20:48 ` Nick Bowler
[not found] ` <20100614204805.GA12589-7BP4RkwGw0uXmMXjJBpWqg@public.gmane.org>
2010-06-14 21:09 ` Justin P. Mattock
2010-06-14 21:09 ` Justin P. Mattock
2010-06-14 21:09 ` Justin P. Mattock
2010-06-14 21:05 ` Edward Shishkin
2010-06-14 21:05 ` Edward Shishkin
2010-06-14 21:21 ` Justin P. Mattock
2010-06-14 21:21 ` Justin P. Mattock
2010-06-14 21:47 ` Edward Shishkin
2010-06-14 22:50 ` Justin P. Mattock
2010-06-14 22:50 ` Justin P. Mattock
2010-06-14 23:07 ` Stefan Richter
2010-06-15 0:01 ` Justin P. Mattock
2010-06-15 0:01 ` Justin P. Mattock
2010-06-14 20:26 ` [PATCH 2/8]bluetooth/hci_ldisc.c Fix warning: variable 'tty' " Justin P. Mattock
2010-06-14 20:26 ` Justin P. Mattock
2010-06-15 0:24 ` Gustavo F. Padovan
2010-06-15 0:24 ` Gustavo F. Padovan
2010-06-14 20:26 ` [PATCH 3/8]char/hpet.c Fix variable 'hpet' " Justin P. Mattock
2010-06-14 20:26 ` Justin P. Mattock
2010-06-14 20:26 ` [PATCH 4/8]drivers:tmp.c Fix warning: variable 'rc' " Justin P. Mattock
2010-06-14 20:26 ` Justin P. Mattock
2010-06-15 0:13 ` Valdis.Kletnieks
2010-06-15 0:13 ` Valdis.Kletnieks-PjAqaU27lzQ
2010-06-15 2:12 ` Justin P. Mattock
2010-06-15 2:12 ` Justin P. Mattock
2010-06-15 3:49 ` Valdis.Kletnieks
2010-06-15 3:49 ` Valdis.Kletnieks-PjAqaU27lzQ
2010-06-15 3:56 ` Justin P. Mattock
2010-06-15 5:29 ` Peter Stuge
2010-06-15 5:58 ` Justin P. Mattock
2010-06-15 5:58 ` Justin P. Mattock
2010-06-15 6:57 ` Stefan Richter
2010-06-15 7:27 ` Justin P. Mattock
2010-06-15 7:56 ` Stefan Richter
2010-06-15 8:30 ` Justin P. Mattock
[not found] ` <20100615052944.7746.qmail-Y+HMSxxDrH8@public.gmane.org>
2010-06-15 5:58 ` Justin P. Mattock
2010-06-15 9:19 ` Jean Delvare
2010-06-15 9:19 ` Jean Delvare
2010-06-15 9:19 ` Jean Delvare
2010-06-15 9:19 ` Jean Delvare
2010-06-15 9:41 ` Justin P. Mattock
2010-06-15 9:41 ` Justin P. Mattock
2010-06-15 18:53 ` Sergey V.
2010-06-15 18:53 ` Sergey V.
2010-06-15 19:36 ` Justin P. Mattock
2010-06-15 19:36 ` Justin P. Mattock
2010-06-14 20:26 ` [PATCH 5/8]drm:drm_gem Fix warning: variable 'dev' " Justin P. Mattock
2010-06-14 20:26 ` Justin P. Mattock
2010-06-14 20:26 ` [PATCH 6/8]i2c:i2c_core Fix warning: variable 'dummy' " Justin P. Mattock
2010-06-14 20:26 ` Justin P. Mattock
2010-06-14 20:53 ` Jean Delvare
2010-06-14 21:06 ` Justin P. Mattock
2010-06-15 11:43 ` Jean Delvare
2010-06-15 11:43 ` Jean Delvare
2010-06-15 11:43 ` Jean Delvare
2010-06-15 11:43 ` Jean Delvare
2010-06-15 16:51 ` Justin P. Mattock
2010-06-14 21:28 ` David Daney
2010-06-15 11:40 ` Jean Delvare
2010-06-15 11:40 ` Jean Delvare
2010-06-15 16:20 ` David Daney
2010-06-15 16:20 ` David Daney
2010-06-16 9:45 ` Jean Delvare
2010-06-16 9:45 ` Jean Delvare
2010-06-16 9:45 ` Jean Delvare
2010-06-16 9:45 ` Jean Delvare
2010-06-14 20:26 ` [PATCH 7/8]ieee1394/sdp2 Fix warning: variable 'unit_characteristics' " Justin P. Mattock
2010-06-14 20:26 ` Justin P. Mattock
2010-06-14 21:44 ` [PATCH] ieee1394: sbp2: remove unused code Stefan Richter
2010-06-14 22:35 ` Justin P. Mattock [this message]
2010-06-14 23:22 ` Stefan Richter
2010-06-14 23:58 ` Justin P. Mattock
2010-06-15 0:08 ` (no subject) Stefan Richter
2010-06-15 0:00 ` [PATCH] ieee1394: remove unused variables Stefan Richter
2010-06-15 0:05 ` [PATCH] ieee1394: sbp2: remove unused code Stefan Richter
2010-06-15 1:59 ` Justin P. Mattock
2010-06-15 11:38 ` [PATCH 7/8]ieee1394/sdp2 Fix warning: variable 'unit_characteristics' set but not used Jean Delvare
2010-06-15 11:38 ` Jean Delvare
2010-06-15 11:38 ` Jean Delvare
2010-06-15 16:52 ` Justin P. Mattock
2010-06-15 16:52 ` Justin P. Mattock
2010-06-14 20:26 ` [PATCH 8/8]tuners:tuner-simple Fix warning: variable 'tun' " Justin P. Mattock
2010-06-14 20:26 ` Justin P. Mattock
2010-06-15 5:16 ` Mauro Carvalho Chehab
2010-06-15 5:16 ` Mauro Carvalho Chehab
2010-06-15 5:37 ` Justin P. Mattock
2010-06-15 5:37 ` Justin P. Mattock
2010-06-15 5:50 ` Justin P. Mattock
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=4C16AECD.50506@gmail.com \
--to=justinmattock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stefanr@s5r6.in-berlin.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.