From: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
To: jejb@kernel.org, hch@infradead.org
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
JBottomley@Parallels.com, Sathya.Prakash@avagotech.com,
Nagalakshmi.Nandigama@avagotech.com,
linux-kernel@vger.kernel.org,
Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Subject: [PATCH] [SCSI] mpt2sas, mpt3sas: fix sparse warings restricted __le16 degrades to integer
Date: Mon, 12 Jan 2015 18:22:29 +0530 [thread overview]
Message-ID: <1421067149-12066-1-git-send-email-Sreekanth.Reddy@avagotech.com> (raw)
Fixed sparse warings 'restricted __le16 degrades to integer' generated
from below titled patch
[PATCH v2 02/22] [SCSI] mpt2sas, mpt3sas: Added support to log message
when Temperature Threshold exceeds for any Sensor
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 12 ++++++------
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 5950731..3f26147 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -3670,12 +3670,12 @@ _scsih_temp_threshold_events(struct MPT2SAS_ADAPTER *ioc,
{
if (ioc->temp_sensors_count >= event_data->SensorNum) {
printk(MPT2SAS_ERR_FMT "Temperature Threshold flags %s%s%s%s"
- " exceeded for Sensor: %d !!!\n", ioc->name,
- ((event_data->Status & 0x1) == 1) ? "0 " : " ",
- ((event_data->Status & 0x2) == 2) ? "1 " : " ",
- ((event_data->Status & 0x4) == 4) ? "2 " : " ",
- ((event_data->Status & 0x8) == 8) ? "3 " : " ",
- event_data->SensorNum);
+ " exceeded for Sensor: %d !!!\n", ioc->name,
+ ((le16_to_cpu(event_data->Status) & 0x1) == 1) ? "0 " : " ",
+ ((le16_to_cpu(event_data->Status) & 0x2) == 2) ? "1 " : " ",
+ ((le16_to_cpu(event_data->Status) & 0x4) == 4) ? "2 " : " ",
+ ((le16_to_cpu(event_data->Status) & 0x8) == 8) ? "3 " : " ",
+ event_data->SensorNum);
printk(MPT2SAS_ERR_FMT "Current Temp In Celsius: %d\n",
ioc->name, event_data->CurrentTemperature);
}
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index e8e6bd4..5a97e32 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -3364,12 +3364,12 @@ _scsih_temp_threshold_events(struct MPT3SAS_ADAPTER *ioc,
{
if (ioc->temp_sensors_count >= event_data->SensorNum) {
pr_err(MPT3SAS_FMT "Temperature Threshold flags %s%s%s%s"
- " exceeded for Sensor: %d !!!\n", ioc->name,
- ((event_data->Status & 0x1) == 1) ? "0 " : " ",
- ((event_data->Status & 0x2) == 2) ? "1 " : " ",
- ((event_data->Status & 0x4) == 4) ? "2 " : " ",
- ((event_data->Status & 0x8) == 8) ? "3 " : " ",
- event_data->SensorNum);
+ " exceeded for Sensor: %d !!!\n", ioc->name,
+ ((le16_to_cpu(event_data->Status) & 0x1) == 1) ? "0 " : " ",
+ ((le16_to_cpu(event_data->Status) & 0x2) == 2) ? "1 " : " ",
+ ((le16_to_cpu(event_data->Status) & 0x4) == 4) ? "2 " : " ",
+ ((le16_to_cpu(event_data->Status) & 0x8) == 8) ? "3 " : " ",
+ event_data->SensorNum);
pr_err(MPT3SAS_FMT "Current Temp In Celsius: %d\n",
ioc->name, event_data->CurrentTemperature);
}
--
2.0.2
reply other threads:[~2015-01-12 12:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1421067149-12066-1-git-send-email-Sreekanth.Reddy@avagotech.com \
--to=sreekanth.reddy@avagotech.com \
--cc=JBottomley@Parallels.com \
--cc=Nagalakshmi.Nandigama@avagotech.com \
--cc=Sathya.Prakash@avagotech.com \
--cc=hch@infradead.org \
--cc=jejb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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 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).