linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* megaraid sparse warnings
@ 2010-02-14  5:23 Randy Dunlap
  2010-05-26 21:28 ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2010-02-14  5:23 UTC (permalink / raw)
  To: scsi, Neela Syam Kolli

Hi,

sparse produces these warnings:

drivers/scsi/megaraid.c:307:65: warning: right shift by bigger than source value
drivers/scsi/megaraid.c:309:65: warning: right shift by bigger than source value
drivers/scsi/megaraid.c:313:67: warning: right shift by bigger than source value
drivers/scsi/megaraid.c:315:67: warning: right shift by bigger than source value

on this source code:

	/* use HP firmware and bios version encoding */
	if (adapter->product_info.subsysvid == HP_SUBSYS_VID) {
		sprintf (adapter->fw_version, "%c%d%d.%d%d",
			 adapter->product_info.fw_version[2],
			 adapter->product_info.fw_version[1] >> 8,
			 adapter->product_info.fw_version[1] & 0x0f,
			 adapter->product_info.fw_version[0] >> 8,
			 adapter->product_info.fw_version[0] & 0x0f);
		sprintf (adapter->bios_version, "%c%d%d.%d%d",
			 adapter->product_info.bios_version[2],
			 adapter->product_info.bios_version[1] >> 8,
			 adapter->product_info.bios_version[1] & 0x0f,
			 adapter->product_info.bios_version[0] >> 8,
			 adapter->product_info.bios_version[0] & 0x0f);
	} else {


Are the fw_version and bios_version fields more than 8 bits each for HP subsys VID
products?  Do HP VID products need a different struct so that they print this info
correctly?

thanks,
-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-26 22:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-14  5:23 megaraid sparse warnings Randy Dunlap
2010-05-26 21:28 ` Randy Dunlap
2010-05-26 21:39   ` Al Viro
2010-05-26 22:00     ` Randy Dunlap

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).