[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1421067149-12066-1-git-send-email-Sreekanth.Reddy@avagotech.com>
Date: Mon, 12 Jan 2015 18:22:29 +0530
From: Sreekanth Reddy <sreekanth.reddy@...gotech.com>
To: jejb@...nel.org, hch@...radead.org
Cc: martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
JBottomley@...allels.com, Sathya.Prakash@...gotech.com,
Nagalakshmi.Nandigama@...gotech.com, linux-kernel@...r.kernel.org,
Sreekanth Reddy <Sreekanth.Reddy@...gotech.com>
Subject: [PATCH] [SCSI] mpt2sas, mpt3sas: fix sparse warings restricted __le16 degrades to integer
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@...gotech.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists