Received: by 10.223.185.111 with SMTP id b44csp492757wrg; Fri, 9 Mar 2018 08:18:32 -0800 (PST) X-Google-Smtp-Source: AG47ELvS/bYX8Mq/YBtqEkmEIvZDLJjUW2aIvQuSrACFM685CkBB2jqyze1WAllx7mKsT5fyeNrT X-Received: by 2002:a17:902:858c:: with SMTP id e12-v6mr28449480plo.39.1520612311986; Fri, 09 Mar 2018 08:18:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520612311; cv=none; d=google.com; s=arc-20160816; b=yThJ43vEG9oEpqSbQxPcuyC16XI8nTbWRJktkEOW+hpn4Y96se1o+2SbuacqVfAeFM lBc2w5AtqYLSdRqbXHDMdTkMIF96AglGVgsFbv7fyWzPhZoUin7NOQgl4BO1IaSQ56Po 7azIVZbL1gmvuWGaXXMGHlsAqJy3z59TgMjPM5jRyFLes9adCvLtJVAdi0ChOfjQHDAs MGKFmg+O4zI/Mk24Fc7aMkZUVWMtxFc8zYnw+FV9IkU2RaXaf/VP2VFS9znIwsoqsS/j auejXS6HSnOpupC9SkaiM4rKYI2bgJ1ChRftcioEH9frhRw7Q5RHnm0fwVD3JDdB1kya 01ZA== 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=ZcN8jP0e/2t0UaG8CrEhmm7GBp7UeOwarLYkmdk9Sp4=; b=e28nDrPiKBkEwQ7kzcs1CvGipNEjv9kOqdGIM20/GwkAmGeEz2TugrHFzGpOQeY0XW 2jhH8ULV/bclVF5zo8bFf2nl4lQRZ10fF7je5B8ek+bXmkDyp1+vqioQwclLtCsqbqU2 UUZCgGCXTTXI5sZOGh7h1UV2D+7ObYkwcKhYKTYR0+how7hRNd4yeRAArdTzU+AOnrjw o2FDQXQjDMcmXZftD72UCeGYmWwUJ0igpAdkBxIxk5vSvgUZsHTsFJSaXBpI4DBf2MUt m2kuwUCYthUr+eQiyzLLzeNd9fm2bMcBKPMG7ex8TtweRK2tGwNVF/17tXVpRcw378Wu ZMcA== 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 x15-v6si1089245plr.384.2018.03.09.08.18.16; Fri, 09 Mar 2018 08:18:31 -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 S932195AbeCIQRL (ORCPT + 99 others); Fri, 9 Mar 2018 11:17:11 -0500 Received: from mout.web.de ([217.72.192.78]:54249 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbeCIQRK (ORCPT ); Fri, 9 Mar 2018 11:17:10 -0500 Received: from [192.168.1.2] ([92.228.30.253]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MGzXS-1epKVN47gA-00DlqZ; Fri, 09 Mar 2018 17:17:08 +0100 Subject: [PATCH v2 07/17] mfd: smsc-ece1099: Improve a size determination in smsc_i2c_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML References: Message-ID: <1d0b572d-ed39-972e-dda6-4019d92e135d@users.sourceforge.net> Date: Fri, 9 Mar 2018 17:17:06 +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-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:wJ8vME+ApXp2gTCEgaa8F1W7eiTOuu6G0+4LzRxpOqGIwRZyx1L RF9aIv49plW4JU0QGNhyW+X3lA5xyNlqnLA+pWHbtUB8nEgms9Gf3uWcz2acx8W1kp3YZhb NJpYDObg6HHZiQeycivqfvKQm8+i8s9n67IorQiWxkU0nVFhRkS8LK1K2BvQBdCPryhE8gA oCNuPImuJKsAkagNy1bQQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:BhIMZJjp+mA=:6f9H5kBaCHLj+d+NUqkkH+ FyyjUZtK9yxtTBJy7RGukVL6fviZYyrbKvMwl/BC76iEfSbLtPXMJCwFC4lmomxfXdwazkJSr 8QXRmDiF5OiXkwh9AXiRuh60hsMD3j9MR4UUuZYCkzX3Xv3fbgv0FabgCgM9O6/fS5Y23f7s7 ZbEg6AdmvSntVTqyWkBd8n2BBF+NTMgBFttBDXTiNOJ5hcTmL7+FfN15gcHramPjKCZMCxsvF 8YSWGjPlPdHU3oQrsitInsf/AZo/wBYFrS59+JV6FQo2O72F0oHUYV/37WzU0YNezJT7mi9ja o1pWJ1eIUA01XnVOGudxKdQhWC9tkH4bQgpbo2JNNJn1Bx6JTDmAz467mseqfO9t/WJzt53OX plBzqPt6puMj57/7mfSpJiub1DoGK2v5hcVsLFVyamtE8d8KgsnaDCDwXYpYEFKN2mdGtowEQ u2SfMcy1mHrxCGxvaJcCgbotZjgOc19BY6IgV30hJO8NaJs3aCarWAoyBd4LQVhSFnlh6HIFa 9xqnRYLnM2JTQhVVCZaETvzFXgff+j2MeytI5QOn1WGL7W9QdQelELJW4k5HP4GaIxtl8Mmqc QLVwqr9GkQyVfByqJt0ay0u15X5GagBLJXUj/7X6onnIJqufLHurgkHNCyCrdtjrKvDZfOGrl j+K9LUdUSV0IWjn1So7QXlA3asKDPVUKtRNH9Y0epvxWmeTe1QhCcpaNmNQA7y5/klZErmHMN UHRKuxHEDTlAfkMADk2293Hh1Lbg4fEH11P6U3OytDl4So26b6tHNCQ5v6Lgs9zah512B7QEO +s20tfKFEYgzyMbsJGXbfWMKBdq4iIWoFIWVOjpHdhsEMEk0Jc= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Thu, 8 Mar 2018 15:05:16 +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 --- v2: Lee Jones requested a different source code layout for this transformation. The change was rebased on source files from Linux next-20180308. drivers/mfd/smsc-ece1099.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mfd/smsc-ece1099.c b/drivers/mfd/smsc-ece1099.c index b9d96651cc0d..57b792eb58fd 100644 --- a/drivers/mfd/smsc-ece1099.c +++ b/drivers/mfd/smsc-ece1099.c @@ -37,8 +37,7 @@ static int smsc_i2c_probe(struct i2c_client *i2c, int devid, rev, venid_l, venid_h; int ret; - smsc = devm_kzalloc(&i2c->dev, sizeof(struct smsc), - GFP_KERNEL); + smsc = devm_kzalloc(&i2c->dev, sizeof(*smsc), GFP_KERNEL); if (!smsc) return -ENOMEM; -- 2.16.2