Received: by 10.223.185.116 with SMTP id b49csp550058wrg; Sat, 10 Feb 2018 13:10:03 -0800 (PST) X-Google-Smtp-Source: AH8x224t3rSg1cASSq9iPtH2wDjw23blCQ1w9sk3E+7LNJJGbU+mACsYVGM7dERGLCAyECxHDUOF X-Received: by 2002:a17:902:a983:: with SMTP id bh3-v6mr6423788plb.237.1518297002994; Sat, 10 Feb 2018 13:10:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518297002; cv=none; d=google.com; s=arc-20160816; b=m4WexbYI+3lcHKxCDF12F9rFNzrlSDxkDSZ6WWa/ikMQQ2QzE7RzwSZTHdCdGlxIvS 0ddKaY21FpAVpPME03XGUbC1K9FoWBZvGu/yW/ZU/aMOz4x2+Q8SFQ0fRjMiGHB520TT 4NmF+c+2QTBBeYcRJyr9xkIUU1TuJPDEjRyxOmg3EJmyzQBV6GunBAMur/IReBzEFbsB aIaYoKJvWpSJsrkxWNK4444hgbyYFSQYo8eELGCwb7rmgp3IAzyHKuQ2ZCaI85ZebCsr JOSaSNdFVLW61U4XAnCtfYoHmjp1SkSk/VP2S7+DV/XbDOA5KOS5f20IcBFVliydmMBb Gl8w== 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=20VApbjUj39HMKHIg2tepSvLwr7lOor8ky39s5SijIk=; b=yAwsjOTzYbAEASlJCDxL3vLB0fZA0oYtX+HUzYoEXphqM0RLTKu5CZJV9+9P60Ely4 1klQDFQ2aaSQ7VJpw41wjjkf0ifpWZ068D5dWFRJzjlU9OqGB0MNJCxdYR8dS1YjobPO 6MygwEiHRgnlgfnXp473gwU87u1DPWm2vAkmfElEm/d/xev3GvHxN+Ky2Rv74ZlLWt82 rFLitYS+qtS+ZPeAIPu4Iq3naw9wTuOjRxkQFG09mQaOxlKjDF7pabSvQvxJ8U1dRugS vU/v+Cn82zGEEGGytX8rRSOY7Q+JJrTxFXaHgF+p9N/IBNtpXD0XPO7zw8hVnUhb5/8S jh8g== 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 y4si70379pgp.800.2018.02.10.13.09.48; Sat, 10 Feb 2018 13:10:02 -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 S1752547AbeBJVIi (ORCPT + 99 others); Sat, 10 Feb 2018 16:08:38 -0500 Received: from mout.web.de ([212.227.15.14]:44563 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752498AbeBJVIg (ORCPT ); Sat, 10 Feb 2018 16:08:36 -0500 Received: from [192.168.1.2] ([78.53.150.195]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MVtmK-1eDYmL2OXg-00X5fo; Sat, 10 Feb 2018 22:08:29 +0100 Subject: [PATCH 2/2] gpio: omap: Improve a size determination in omap_gpio_probe() From: SF Markus Elfring To: linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, Grygorii Strashko , Kevin Hilman , Linus Walleij , Santosh Shilimkar Cc: LKML , kernel-janitors@vger.kernel.org References: <8ec31664-badc-5454-b759-ae9132833589@users.sourceforge.net> Message-ID: <422a4c63-5ffc-2b40-4d9a-cf947d4af2fd@users.sourceforge.net> Date: Sat, 10 Feb 2018 22:08:28 +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: <8ec31664-badc-5454-b759-ae9132833589@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:ax4hthMaPQTzzjdJou8ZCtM1v1qqVKmYBRdn7poY8ecLVn4oXwE RzJDt3eGB0/TbHZpYlC6ICoo2V1pwJfQqvOBCHOOF88jpnSYuqA3GW8p0h0w6EIDPj+2cR5 qO3oDJGT91ahF3kf/mC5kGzrZmBs1pC34I4qxgl92VPqUZTt+nTKcF2smJO4nQ8jFTBNIzf ZpvS8zP5ctY3WQK6rip5A== X-UI-Out-Filterresults: notjunk:1;V01:K0:isfcWtWLal4=:mJcD+M+uo9B21pe0i3empd yu4Di+vgnxwDrc8fiy0rpkRkQsmiYl1PU6xOs5FZE5BIy7yxtXfoaSzsNaQlNuaLlS4WhBjxg elJgx9WP/+7/AnPnF4qAX710l1/n2Qv2yrpAWxo48W2Ug1z0iyvU2iscKOqQfserMPw8OJ0pb q6ASarIjK7uB7nM8LccrcQrCl7EEMOi6zee7t6a/pSkqljJ1XEpGF5pVtNPoD84jmCmOCZHZ0 8ZpKkhDKBsh4dN5rVMrSFBgGzh0fh3KRZIHAopkPIKmo3qwhiBD6c3Y3bs3eQgk91NGyHQZq7 d7NWZLG9RxBd+yxtm4Qp5CSMkW+lecmPBs2DLItSvQGX/5D0fvBbnAMudKaydP7B1GJGrst4Y J4hmfO5IhCMMMYvI53gpr9W2HYeAZQnvTeCsbyhC7tH8vl+Et9urhV0rZKThivK3lk3Ssqfe0 LG9JutDa5RHQf+3w58ykGsk+2fsaNViDdFOI3M/x6vy0jYToEQIROU7CgTwDQVd7RLnAY1OBJ IzXk3+8Ju7TVlqULSKdNMQdf/xlFrcuU1IP6ljUsiI71fcE8JYA3ArBaYGh6TT/QhbqAgE6c4 8zfWw+HKSeo8vLI2mlBAWJQhgYMbJtLOWVD5CI7O2QtziJ48CNc0cEYB/tQxeDsuY5cyHXDc3 w/BWQDdDj9H/WfKM+JSJVTKhFlOZybVjb1lO25pqllKjd9MDu/eeMgYe0wuT8NotTXZWrr1AW h5ut5sBr9tX+jWV6QkkttwC0pj3mw1ZLn+CowtPNQx+EJi3StVLLuwD2tUyZZhCSD4SH7DscW 7CQDSve+bG1DY2TSa8tr+KlA4AP+QKeDny5ezEuoZOFJjgc/jY= 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:49:22 +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-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 4db6f13fa133..35971a341c40 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1157,7 +1157,7 @@ static int omap_gpio_probe(struct platform_device *pdev) if (!pdata) return -EINVAL; - bank = devm_kzalloc(dev, sizeof(struct gpio_bank), GFP_KERNEL); + bank = devm_kzalloc(dev, sizeof(*bank), GFP_KERNEL); if (!bank) return -ENOMEM; -- 2.16.1