Received: by 10.223.185.116 with SMTP id b49csp528262wrg; Sat, 10 Feb 2018 12:34:50 -0800 (PST) X-Google-Smtp-Source: AH8x225NE45SxVC6FKbIjoy8UKKk8RaCqDP00XxVfO8CeX2cyKb0M1i71O4ACpZk/peb3EGULi2k X-Received: by 10.98.234.19 with SMTP id t19mr6979884pfh.74.1518294890730; Sat, 10 Feb 2018 12:34:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518294890; cv=none; d=google.com; s=arc-20160816; b=mKRyDpJVBreA7vB0qzqvSgvCzGEqwI2m6SVR1yTyEjxG9NGBL2Amk190B0v2S7H5ud r5BPGYfEMqJCdVYAkxx19QJO2CutQ7WHk2LS5IFu0Fj+acZ5VUpXpcQ2p0ezAb+fPVwa DeWX6+6kEJxCOyV2hxePDVRu5a6hHKqiot2l+8DVSs+kpZtmp3TTo6jQo7usT0DvuDzT CVgkmG3llAXFVIQnJt3R8BZZhRvaD47jc+1pljmmOF3yzKRBFc+B3jT4qswRFuquk9wb CUle1xmODE7jN8IxP7fDUSQRYrDGd2hNS6tR052rD77XtwhF5J4Fc7hwkI0H09lTOdcc h9BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=HXG7ZnvU15NOuWYA7WBqK1cAUykWZ2vrsYOQ92IqYR0=; b=p2RFZRyo258VQ7HKc7NMJ5unlF5FaYWb/8sfLAvcsNLRTFfk2UFSWtRI3Hr5qJXB53 NL4SXk7QocJABP0Nf6sAPoAYX5l5MZ9f4ewDcUkPLAodytJkjIzMcwVjsClbaX4wvQui 8JzbpNKpO4IS1U1zVaAZ/P4Z8aGCZH0CjKhKTD7nb7xwnQESl20Y6rnNkV6QNpTxyfpU nXXSRCrKUaMrhVYagHCsqe++O026GFcImK5EaJfRxgI8tidZ2etQU/fOTy1+m+AY/H2m pIoYdr8ibXrL3OmGl/DUXsYU6O+iV0qg4X/394zvmjHWXchfd3tuRR2i/Wmk+lcqHXyZ aJEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23si1359416pgc.454.2018.02.10.12.34.36; Sat, 10 Feb 2018 12:34:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752449AbeBJUd4 (ORCPT + 99 others); Sat, 10 Feb 2018 15:33:56 -0500 Received: from mout.web.de ([212.227.15.4]:51725 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222AbeBJUdy (ORCPT ); Sat, 10 Feb 2018 15:33:54 -0500 Received: from [192.168.1.2] ([78.53.150.195]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LhNmy-1f6lMm1ds8-00mbzs; Sat, 10 Feb 2018 21:33:52 +0100 Subject: [PATCH 2/2] gpio: timberdale: Improve a size determination in timbgpio_probe() From: SF Markus Elfring To: linux-gpio@vger.kernel.org, Linus Walleij Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: Date: Sat, 10 Feb 2018 21:33:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:om60do2Q1c8cEsndG4HZxxdUmHm2RzoOeZKia50L+M2SFX6ZtIP 7K+DgTMwSCgmFccURP4hojz/Me/s0LTiR0IFpoX3IZN7gssRK3quzfnxYlCBuXj2s0GSO8L XnHRRz+nWWrMHgMClZDRbqrbrA/pjGpoyRoQdE3fDJsofseJO92SEyj3vdf1pINKTdSW0Jv F/YFiH66U0hoaPkWe8+9w== X-UI-Out-Filterresults: notjunk:1;V01:K0:LOMqgAI+Mgo=:4ZIgvlYeaps1MZ+zS8rSVf eGaRTJiWJUOaUU5UCtY0zBzKaVWKwK+us3e5JXW1vPLMEfYO74OpdEps0fBoi4DwVXZqdiWuD aPb0mMx0AdjETvUNi2QVXMx9u/ipOQYarinB+C98U1UOeixb7a1EgYrUxu9mDCFcUc2FS91OM hYFoF7SqJODFieQgDzrUGy28ts+EOUOEvutTUJyOEdMnf7131+1yla62XpAFbjJOLRoZQfmBh 3lvpMFQtxsbEmNVeqDoU6NToTpnSp2cJ2KGfTRdmoLVIEVxJq+QNAI5jKQQVDS5aN9qbleREL Q1QnsUKND0Nmu/Pg3dN2E3UIBg3VG2LFqc73tUyJbiX708JILUv+QYQf7Sm7q9UCqRcvLycx2 JaCciJsRVahfdqH7J+VJ7Lvu19R+2PBI+H8ybqBAthk6f6PaTtaJXwCIpZ86QAfkwQlJ6V9XV vytqyYnMlSjwx/nDBYC/37tHjkVW4R4v2LZmgmAh/RY2NYuPwfWySO/fMkzbmTzNbYqXxfKyc 1QHrw5L8oe2+B/1oCyvEPfKXur0Ru79VDtClUAB09oRKSkZYhe40jZlcsDbSXIZ49oYavD44q 8k1ZGa1csdqIUW7YYhV4FMpkujd+U42z+W3tcSIYXgCwnD4gpxcfYf14i+RQMQ/1ac1RmNl2+ cgihOsLtV/ijy+gWnPt0ifSbn8JJ2WyxWeYBfCtciKbV1VDvWjec6AvHOauFhecgmCYkxk08c NJdt7FCXv9NsiGKXLcIbyapbFC1+6IKzMpdWfxgzyvKJq6U6OJyzGxkZmIWC5F92uUnjE8Jb9 PgwcyzhiSuDnboexdBOM0kemii+1kCFB5U5cDl0q8nRbFKOo7Y= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Sat, 10 Feb 2018 21:13:28 +0100 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpio/gpio-timberdale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c index ff155e437210..6520a8475910 100644 --- a/drivers/gpio/gpio-timberdale.c +++ b/drivers/gpio/gpio-timberdale.c @@ -238,7 +238,7 @@ static int timbgpio_probe(struct platform_device *pdev) return -EINVAL; } - tgpio = devm_kzalloc(dev, sizeof(struct timbgpio), GFP_KERNEL); + tgpio = devm_kzalloc(dev, sizeof(*tgpio), GFP_KERNEL); if (!tgpio) return -EINVAL; -- 2.16.1