Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751876AbdLMJkX (ORCPT ); Wed, 13 Dec 2017 04:40:23 -0500 Received: from mail-bo1ind01on0092.outbound.protection.outlook.com ([104.47.101.92]:45513 "EHLO IND01-BO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750880AbdLMJkT (ORCPT ); Wed, 13 Dec 2017 04:40:19 -0500 From: Dhaval Shah To: =?iso-8859-1?Q?Pali_Roh=E1r?= CC: "dvhart@infradead.org" , "andy@infradead.org" , "platform-driver-x86@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] platform/x86: dell-smo8800: Possible unnecessary 'out of memory' message Thread-Topic: [PATCH] platform/x86: dell-smo8800: Possible unnecessary 'out of memory' message Thread-Index: AQHTc+u6asn84bwDOkaSHH5F3brCJ6NA8YmAgAAR1p0= Date: Wed, 13 Dec 2017 09:40:14 +0000 Message-ID: References: <20171213082354.23273-1-dhaval.shah@softnautics.com>,<20171213083053.mywa4bgv56daxud6@pali> In-Reply-To: <20171213083053.mywa4bgv56daxud6@pali> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dhaval.shah@softnautics.com; x-originating-ip: [219.65.63.222] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BM1PR0101MB1443;6:Q4QE3aTglox9cWHYZZ7gvKr1gqvc9ttmenSYp+Okr5v+tRhpIjHbHnvtCJ7JH04bIn1jBOjvATuzgUj2OAcHyZ1oPuKD75h5Mg5AKPB2zfitWLt+oTOON7ATSVa08FGUrsQrvzTUJ3EGvUDrwmPXN5nIY+kHVuQLVShb1/czxQ1uwNMfvuDHBqsqwSieFa3Hc7aZy8CDZJb+yXSc1vK2zM4K+6tmISN3171UaSoM9Nk0qawU7T88P/saGZV29pg38KYPN2AIe6PNGnZtIYGvvKVJvlDbrw6vX4ac17fIS+5pJFHA6rkbNtlJoskDk5l5EBafAOXc5jltHeOx/t3ZHVrOwVTelxIKnHUJgkilyrw=;5:4WlSaiRriwpQiL9nYhxrvAhJcJPQS1G9AAJ9/Sb6HIlejS9jc7eNBfHcjHn3st1SkZUosCFbe3Ktq+rApNY7FWUP+QGSF6UqsLpyG5FdRT61a075zHL+rDJqEvEkXoBCcYiBXU+Zo72f5ExX1emy1FuO61jQ1x0mYYrizYuGCgM=;24:eKaayzzkr5sz3JK/P+idh/jEnK6Ug778+eajDGnYOONrBR3LhPqd5iOcwqXVzA9AGMFyamCOB+8HRmmjTWV1vqmbxF6iChK/sUUYesUkLPo=;7:2mjECGrYPkydU8tMS0LRIJbKkz4lZDKdPt68PXhx+O2qGH5QMbkt3PtWm/+ieN5tDueRHjByb9IuN4JFIIXvkUx1T/BStSJcQzfnb5GWflVTfWljUiAc3NDpeHUGptB1441xDZ5oOo/EIxxHf5/NDVQc2pCXHOBISmnax0iM4F0IFJ1CrutuHmdDRImC4nrYko321mHCOJk2iuiw8TZhj/uS014FYNU8NnjqfwRWs5WXETy4GsN7ZRsfKUse9wUY x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: ceca9211-9ce7-425f-56e6-08d5420d8325 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(4603075)(4627115)(201702281549075)(2017052603307);SRVR:BM1PR0101MB1443; x-ms-traffictypediagnostic: BM1PR0101MB1443: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231023)(6041248)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(2016111802025)(20161123564025)(20161123555025)(6072148)(6043046)(201708071742011);SRVR:BM1PR0101MB1443;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:BM1PR0101MB1443; x-forefront-prvs: 052017CAF1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39830400002)(366004)(376002)(346002)(51914003)(24454002)(199004)(189003)(3660700001)(6916009)(105586002)(3846002)(229853002)(106356001)(33656002)(14454004)(15650500001)(2906002)(5660300001)(8936002)(102836003)(3280700002)(53546011)(76176011)(59450400001)(2950100002)(54906003)(6116002)(7696005)(74316002)(68736007)(316002)(7736002)(8676002)(2900100001)(97736004)(81166006)(66066001)(4326008)(81156014)(6246003)(99286004)(305945005)(53936002)(478600001)(39060400002)(86362001)(9686003)(6436002)(5250100002)(55016002)(6506007)(25786009);DIR:OUT;SFP:1102;SCL:1;SRVR:BM1PR0101MB1443;H:BM1PR0101MB1444.INDPRD01.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-OriginatorOrg: softnautics.com X-MS-Exchange-CrossTenant-Network-Message-Id: ceca9211-9ce7-425f-56e6-08d5420d8325 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Dec 2017 09:40:14.4126 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 17b76cff-50c6-4f7a-9198-dd4afc5f8bea X-MS-Exchange-Transport-CrossTenantHeadersStamped: BM1PR0101MB1443 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id vBD9eQs7019188 Content-Length: 1735 Lines: 44 Hi Pali Rohar, Thanks for the review. ________________________________________ > From: Pali Roh?r > Sent: Wednesday, December 13, 2017 2:00 PM > To: Dhaval Shah > Cc: dvhart@infradead.org; andy@infradead.org; platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] platform/x86: dell-smo8800: Possible unnecessary 'out of memory' message > > On Wednesday 13 December 2017 13:53:54 Dhaval Shah wrote: > > Removed Possible unnecessary 'out of memory' message checkpatch warnings. > > Issue found by checkpatch. > > > > Signed-off-by: Dhaval Shah > > --- > > drivers/platform/x86/dell-smo8800.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/drivers/platform/x86/dell-smo8800.c b/drivers/platform/x86/dell-smo8800.c > > index 1d87237bc731..9590d5e7c5ca 100644 > > --- a/drivers/platform/x86/dell-smo8800.c > > +++ b/drivers/platform/x86/dell-smo8800.c > > @@ -150,10 +150,8 @@ static int smo8800_add(struct acpi_device *device) > > struct smo8800_device *smo8800; > > > > smo8800 = devm_kzalloc(&device->dev, sizeof(*smo8800), GFP_KERNEL); > > - if (!smo8800) { > > - dev_err(&device->dev, "failed to allocate device data\n"); > > Hi! Any particular reason for removing error message? > When you give the -ENOMEM as error in return then this message info will be provided by the kernel subsystem. no need to give this printk and that's why checkpatch gives warning in this case. > > + if (!smo8800) > > return -ENOMEM; > > - } > > > > smo8800->dev = &device->dev; > > smo8800->miscdev.minor = MISC_DYNAMIC_MINOR; -- Pali Roh?r pali.rohar@gmail.com