Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752845AbdLHIN3 (ORCPT ); Fri, 8 Dec 2017 03:13:29 -0500 Received: from mail-ma1ind01on0127.outbound.protection.outlook.com ([104.47.100.127]:31269 "EHLO IND01-MA1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750927AbdLHINY (ORCPT ); Fri, 8 Dec 2017 03:13:24 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=dhaval.shah@softnautics.com; From: Dhaval Shah To: arnd@arndb.de, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Dhaval Shah Subject: [PATCH 1/3] misc: ad525x_dpot: Prefer 'unsigned int' to bare use of 'unsigned' Date: Fri, 8 Dec 2017 13:43:03 +0530 Message-Id: <20171208081305.15153-2-dhaval.shah@softnautics.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171208081305.15153-1-dhaval.shah@softnautics.com> References: <20171208081305.15153-1-dhaval.shah@softnautics.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [219.65.63.222] X-ClientProxiedBy: BM1PR01CA0102.INDPRD01.PROD.OUTLOOK.COM (10.174.208.18) To PN1PR0101MB1454.INDPRD01.PROD.OUTLOOK.COM (52.134.162.10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d8655f0c-7419-4747-5d85-08d53e138b94 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4603075)(4627115)(201702281549075)(5600026)(4604075)(2017052603307);SRVR:PN1PR0101MB1454; X-Microsoft-Exchange-Diagnostics: 1;PN1PR0101MB1454;3:iFYIXSKmT0tFhBIAlfy1qE1ipTX/F8FjJ4gD3eQR+D8IknFa/h+1D8lNWSXOMp3LiS1qlN/yieoKaobvnvndVzPr127vdxYLPhTo+RM+Fhr+nqNHYf22sgvHbD90glG04x4XXZ2whFTotMhHM38VG18o6eUtqMHv6Q9SgzDT3+JZQ8U2xBay1dgOuOenR0rJXOspS6VJQTamdnlmH71hSQSB4mILPD9ZoQHBQlZ8MoC+jz8CYxNCmB3kexhlhbj4;25:q9jxfytT5SZXrHlwqa+7I4J77CDnVVRFXCuEq+U2VsDwqobVADR27EW0xhdYdwyZ0C9q9PDiql0iYjXjwJSDdSKYGQBNicFm06S9iWfhvGdLoSsF6sNXZ3fJWUVWMJ12l2T5tZoifVWYHVmUvMFHMAPWMugbw+85YI1VDNHWjZf3JXKe6HdwLxU1Hi4/+hfKRPg0bZa2Y6adxCqgSxTKcow9l5dkpL0M9A0dY8bxDVc7IxACPK2qAN861guImSdvIVRBObSxGcy6N3rsmbREntV1j/ZrUmvPfmg1wUrf4agKtEmADqYjJMRzNLnwL3z8QHxviUO/bkinc0cs5N9ptw==;31:3DP0P9y3I92CEo+Vm59Dhsunw28a7X6oTkLuGtVXXZnYMnsQa6WaRfNY9V+JbbEmvA/NCeDIp0Og/uJb0kzIXWbt8rjpxNGNb9geq7EpID8jF8ETQRbf07PSJesUtrLL6trc80npNPHpWheOekYdz+nwfZNEnfOwlwbcYRBbghnf68ORrE6HBVfja21VrEQIt4vwo8OYVBF/nnQVaoTAyF2uGMsvDOkvyKOJ1yD+5aY= X-MS-TrafficTypeDiagnostic: PN1PR0101MB1454: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231022)(6041248)(20161123560025)(20161123555025)(2016111802025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6043046)(6072148)(201708071742011);SRVR:PN1PR0101MB1454;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:PN1PR0101MB1454; X-Microsoft-Exchange-Diagnostics: 1;PN1PR0101MB1454;4:qrjxiEQpNppvhQClT8wEnC3P1Sod84C2q5rP9ppHzr2wUTntAJLVa7NA6Z7plFXwU/N4tmftHMOPka+gycUcSH/QIrnZ1Oso40Z/YVL5RwEMBjf/qNUSGBCqVFgLC/qjHSOrfMVTqJjqMUGuOel45cYq0Jkogv/Qc8D8SZJd8RV7jWV6RZw3V9RwwL1UHUOOJ1ELWHBgNMzzn8mjCOSZqCToANUPvheGn6192luofKk5R3/P8hrWmdPdY1zeKU1/mno8qQWpwoN7AvCw6mSHhQ== X-Forefront-PRVS: 0515208626 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(376002)(366004)(39830400002)(346002)(199004)(189003)(66066001)(51416003)(47776003)(3846002)(1076002)(6116002)(68736007)(53416004)(2906002)(86362001)(8936002)(76176011)(305945005)(69596002)(50226002)(7736002)(25786009)(53936002)(4326008)(48376002)(107886003)(33646002)(50466002)(5660300001)(81166006)(8676002)(81156014)(478600001)(52116002)(106356001)(36756003)(97736004)(105586002)(316002)(6512007)(16586007)(16526018)(6486002)(6666003)(6506006)(2950100002);DIR:OUT;SFP:1102;SCL:1;SRVR:PN1PR0101MB1454;H:piyush.sibshivalik.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;PN1PR0101MB1454;23:r4UHY/JfHWNbORQ+kLOZ9NzHuyBmtrXNaRcm0pA?= =?us-ascii?Q?A4AUH2hnSJNBwxMZIJVRZFHMYlBgrAXw5rwr7vSqLdnZPeKKGSoF+5d81r88?= =?us-ascii?Q?wtqT4+0C+6GGCGhKOEE8Dw4uUEGTf7/GPSKcMdYujlURxum8kkCazBKfPlaB?= =?us-ascii?Q?CzSOxb4qO0cLV1bRFcKNkNLIkKffJkbkJ97YZdb9sGxmvNox65KFUs10gEyo?= =?us-ascii?Q?y/7g11FGBjpbWY0uB0vdSwBkKQgldShbX0TSaYsPwWJxaWTNJOgMrOxYsv5t?= =?us-ascii?Q?Lq52OVrQccKKlGp1GbkA/eNHbwUXr4362ZA6+Y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NR+b8Pgoh9hZMCH+xp6+01LbHXA+jkRWPT5Co8ns6TcfH+NKs1OMUNq69OklQPnf0Rsr3lZaTmrvXgx+3qcHUo+Y4AIhNX3JhXk1wNJJl1h/FBiDZ99/Ek1v2ROm1zJBs0kjpRnQGFzSgCb6G/CkbCnbLSMJkgCX3TrV12kui09vDV62RPUh0sVAVDn5UhsxDGV9DuhPGXj6Z4XJWnqDjHOddUov4QLpMO6b+/XGY14PRTwzg+l1fW6tyNb8AjR11qXRfZC3H6ptC+t4p51LySuANI9y5THfbi2D4eGyLI6l2sj8=;5:cVa5Csj52EsoRS6TVU/gw2b84Fwcjo6cfzwnCSd/2P3rpVK6wMUBAdUTN+1tpehjvMqy6s1DrjjlX2hwkTyv5CtViq8CRykkM6w61o5NO2GbFuhMv95dx9Z0kgK5wNR/H9PsEarr7zqyaE7Rh8Ijh5qwxYNvzBKoSDxQhHt/ppM=;24:MzUM74orxalSnQ7IYLQuYNn6CEPsfCL8fB/MmNLPNyO/o/PZzXKSIjb1GphWulfrMNBH6L9ekft24zSzT59u3AizbPjkMEcZvJXuTS/3nqo=;7:RiniawCOwiX82/jlZqbcUjqjEvug9TehEAE69X64YAcRsgQlcm5VlBB0sY8jVx/gOPet17z3J8P3PBIF/z8X01XAsud6qkaHhRQSw+0Sp4TJ7h9oei3W1w9f4OxQZUjVKUc70YpBqyIRfmtddPNl003q8U60dLdsCDVu9YIHL5syQnBg8n/lUP3m8hlRwHiCXn+Gqj3gqGYnpCYmQ7eGRAWzFlbQgqykYI161OSFxmD6N9WvZfTa4pUYPf/kWFl8 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: softnautics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 08:13:20.8912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8655f0c-7419-4747-5d85-08d53e138b94 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 17b76cff-50c6-4f7a-9198-dd4afc5f8bea X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN1PR0101MB1454 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2614 Lines: 86 Resolved all the Prefer 'unsigned int' to bare use of 'unsigned' checkpatch warnings. Issue found by checkpatch. Signed-off-by: Dhaval Shah --- drivers/misc/ad525x_dpot.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/misc/ad525x_dpot.c b/drivers/misc/ad525x_dpot.c index fe1672747bc1..1c6b55655f52 100644 --- a/drivers/misc/ad525x_dpot.c +++ b/drivers/misc/ad525x_dpot.c @@ -84,12 +84,12 @@ struct dpot_data { struct ad_dpot_bus_data bdata; struct mutex update_lock; - unsigned rdac_mask; - unsigned max_pos; + unsigned int rdac_mask; + unsigned int max_pos; unsigned long devid; - unsigned uid; - unsigned feat; - unsigned wipers; + unsigned int uid; + unsigned int feat; + unsigned int wipers; u16 rdac_cache[MAX_RDACS]; DECLARE_BITMAP(otp_en_mask, MAX_RDACS); }; @@ -126,7 +126,7 @@ static inline int dpot_write_r8d16(struct dpot_data *dpot, u8 reg, u16 val) static s32 dpot_read_spi(struct dpot_data *dpot, u8 reg) { - unsigned ctrl = 0; + unsigned int ctrl = 0; int value; if (!(reg & (DPOT_ADDR_EEPROM | DPOT_ADDR_CMD))) { @@ -175,7 +175,7 @@ static s32 dpot_read_spi(struct dpot_data *dpot, u8 reg) static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg) { int value; - unsigned ctrl = 0; + unsigned int ctrl = 0; switch (dpot->uid) { case DPOT_UID(AD5246_ID): @@ -238,7 +238,7 @@ static s32 dpot_read(struct dpot_data *dpot, u8 reg) static s32 dpot_write_spi(struct dpot_data *dpot, u8 reg, u16 value) { - unsigned val = 0; + unsigned int val = 0; if (!(reg & (DPOT_ADDR_EEPROM | DPOT_ADDR_CMD | DPOT_ADDR_OTP))) { if (dpot->feat & F_RDACS_WONLY) @@ -328,7 +328,7 @@ static s32 dpot_write_spi(struct dpot_data *dpot, u8 reg, u16 value) static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) { /* Only write the instruction byte for certain commands */ - unsigned tmp = 0, ctrl = 0; + unsigned int tmp = 0, ctrl = 0; switch (dpot->uid) { case DPOT_UID(AD5246_ID): @@ -636,7 +636,7 @@ static const struct attribute_group ad525x_group_commands = { }; static int ad_dpot_add_files(struct device *dev, - unsigned features, unsigned rdac) + unsigned int features, unsigned int rdac) { int err = sysfs_create_file(&dev->kobj, dpot_attrib_wipers[rdac]); @@ -661,7 +661,7 @@ static int ad_dpot_add_files(struct device *dev, } static inline void ad_dpot_remove_files(struct device *dev, - unsigned features, unsigned rdac) + unsigned int features, unsigned int rdac) { sysfs_remove_file(&dev->kobj, dpot_attrib_wipers[rdac]); -- 2.11.0