From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752036AbdKVTjI (ORCPT ); Wed, 22 Nov 2017 14:39:08 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:38769 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751956AbdKVTis (ORCPT ); Wed, 22 Nov 2017 14:38:48 -0500 X-Google-Smtp-Source: AGs4zMZQzd5cHosgFs4PyXIq4XKNqBOuiU4EOJGhqj/NHZUzYmTo3XiQ1hpTPrGAiOTGOWb6DoSvfQ== From: Stefano Manni To: Oleg Drokin , Andreas Dilger , James Simmons , Greg Kroah-Hartman Cc: lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, stefano.manni@gmail.com Subject: [PATCH 3/4] staging: lustre: fixed signedness of lov Date: Wed, 22 Nov 2017 20:38:30 +0100 Message-Id: <20171122193831.11801-4-stefano.manni@gmail.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171122193831.11801-1-stefano.manni@gmail.com> References: <20171122193831.11801-1-stefano.manni@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sparse warning on lov_obd.c: warning: incorrect type in argument 3 (different signedness) expected int *res got unsigned int [usertype] *i sparse warning on lov_offset.c: warning: incorrect type in argument 4 (different signedness) expected long long [usertype] * got unsigned long long * Signed-off-by: Stefano Manni --- drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_offset.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index 7ce0102..3cccd79 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -899,7 +899,7 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg, obd_str2uuid(&obd_uuid, lustre_cfg_buf(lcfg, 1)); - rc = kstrtoint(lustre_cfg_buf(lcfg, 2), 10, indexp); + rc = kstrtouint(lustre_cfg_buf(lcfg, 2), 10, indexp); if (rc < 0) goto out; rc = kstrtoint(lustre_cfg_buf(lcfg, 3), 10, genp); diff --git a/drivers/staging/lustre/lustre/lov/lov_offset.c b/drivers/staging/lustre/lustre/lov/lov_offset.c index 3e16e64..954a01b 100644 --- a/drivers/staging/lustre/lustre/lov/lov_offset.c +++ b/drivers/staging/lustre/lustre/lov/lov_offset.c @@ -44,7 +44,7 @@ u64 lov_stripe_size(struct lov_stripe_md *lsm, u64 ost_size, int stripeno) { unsigned long ssize = lsm->lsm_stripe_size; unsigned long stripe_size; - u64 swidth; + long long swidth; u64 lov_size; int magic = lsm->lsm_magic; @@ -128,7 +128,8 @@ int lov_stripe_offset(struct lov_stripe_md *lsm, u64 lov_off, int stripeno, u64 *obdoff) { unsigned long ssize = lsm->lsm_stripe_size; - u64 stripe_off, this_stripe, swidth; + long long swidth; + u64 stripe_off, this_stripe; int magic = lsm->lsm_magic; int ret = 0; @@ -183,7 +184,8 @@ u64 lov_size_to_stripe(struct lov_stripe_md *lsm, u64 file_size, int stripeno) { unsigned long ssize = lsm->lsm_stripe_size; - u64 stripe_off, this_stripe, swidth; + long long swidth; + u64 stripe_off, this_stripe; int magic = lsm->lsm_magic; if (file_size == OBD_OBJECT_EOF) @@ -257,7 +259,8 @@ int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno, int lov_stripe_number(struct lov_stripe_md *lsm, u64 lov_off) { unsigned long ssize = lsm->lsm_stripe_size; - u64 stripe_off, swidth; + long long swidth; + u64 stripe_off; int magic = lsm->lsm_magic; lsm_op_find(magic)->lsm_stripe_by_offset(lsm, NULL, &lov_off, &swidth); -- 2.5.5