Received: by 10.223.176.46 with SMTP id f43csp3061942wra; Mon, 22 Jan 2018 07:50:47 -0800 (PST) X-Google-Smtp-Source: AH8x225aQ3F0UJWh+GCBrVEFVV5g/LtGae+w/9if98MQC3qafqdp550Sx+oiEx4MRXIAFvsCjHbF X-Received: by 10.202.48.88 with SMTP id w85mr3847192oiw.196.1516636247170; Mon, 22 Jan 2018 07:50:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516636247; cv=none; d=google.com; s=arc-20160816; b=rJFiS0MOUqsIeE/194rTrVE7zLjeQK1qzPEZfp2iL50QA05zv73N7mvmABU7Vxue1p NDfKWBC+UF4zUnb8q8vcZWg9YS35xBu9EDMiybt7G0Zkx8hMuAQdzfCCNkjPpINuZtrf j4d7oA3YSKw3/u92Rq73lbUoBVdG2ixl421+FMwVWPBD83nSrVJbgRa3FiHEk2C1/rag J5+x82qp4lbBc1+XvkuHBdiduED7/VBp1Q+aLeupFE6kv+rV09d36FAc53FQCz37rtrR EjGQr3bK9rjW+nNJV/praHTYFbBIdxIGULY8rIXKPgpHAD083HYpcGaajYqsthioCugu UHEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=6DA74mvoD8h9YrTA/cEQZb5P9tCPhSa0w6XMLcTbkqY=; b=fpfw7kQD1vZ6kjgOhaSwuX/8gdfLaez2kOwIWIzASU2Xe+8pINVqYAEsoqofuTyrpW kaTOfxeaGZ27qYX+f3enW5HBx6wPubWMB6+eDhnyspmltBmGDbhZKFykkcYbfhsKA7ZV QEFNHrxThDJ6bHOdqq9Lj4vGxXip9zvN6qt0moS9dYUkecO3hSoRpboVPPYhw3lHG/j3 hUrUKeIbIzuPo8ux5bPWcVtvg2aE+uN6xzgWgZQr7LC11gB1tvNfjdlxuqLASgrNcJc+ htx6SUcN4nhHr5UuRLOpeSgkohI5imfCXbZNKgdG10DvtYLKaSZ32ZsdZWfF3bs1pd+n Nr0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=STb8QMuu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n17si11717161ioo.221.2018.01.22.07.50.34; Mon, 22 Jan 2018 07:50:47 -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; dkim=pass header.i=@linaro.org header.s=google header.b=STb8QMuu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751237AbeAVPuO (ORCPT + 99 others); Mon, 22 Jan 2018 10:50:14 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:41155 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751112AbeAVPuM (ORCPT ); Mon, 22 Jan 2018 10:50:12 -0500 Received: by mail-wr0-f193.google.com with SMTP id v15so6349015wrb.8 for ; Mon, 22 Jan 2018 07:50:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=6DA74mvoD8h9YrTA/cEQZb5P9tCPhSa0w6XMLcTbkqY=; b=STb8QMuuxMLXKa/8trVyX4Agw4NTAdVPPXkhLoX11lLXTJwWe9hGeO80DgrQi33mlU s4u43Q0tjvvs/Zr4HmbpQuEB93BPNzwhdRlSRpNeh/PNv9fSYrCShWeJgJLk7EjtnsRx ICf1eukznMqdGlIq2/IR6B565zCYPjMKqOfdo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=6DA74mvoD8h9YrTA/cEQZb5P9tCPhSa0w6XMLcTbkqY=; b=M8HDAkslEZwZsLNFe9xQEeVzPvmLb9mR8IjhbeINNt8waATJZelpcc6JErKEn33YMe 5zMABNnhWLlcIZ9UDqWX5g43JeNZNPV7aJRT4hIrTcQI8aZmzpJ1mSKfr7kw+cfc5U8y oZWNTrRTNVHP1C6wXxxkDFSselrYMuuVg/Q/CQNHV4CVRYCJGMVGlxC9VW3uD6AQfD24 JSIKx1HMd01Lz73sbLt5xZFoYkAHa4Wfz4ma0wapj9+nJZGWNOQ6oZ+SmmVGQNsRcnIe OWs71tCuJBky8CtXgngtsgavQ8GDqsW9TGIolH7RJlakUqmkRJiQ0SYe5ZzGw7mwWAGb iDXw== X-Gm-Message-State: AKwxytfNiSnguFNaJJPjHVYWHijAQ9XL5AdjoWJUTqu7GCOtMNnzJmM4 ZUjXId56mLOucS1Tx7DFrTAuEg== X-Received: by 10.223.154.77 with SMTP id z71mr7242641wrb.282.1516636211439; Mon, 22 Jan 2018 07:50:11 -0800 (PST) Received: from dell ([2.27.167.60]) by smtp.gmail.com with ESMTPSA id l41sm12911976wrl.1.2018.01.22.07.50.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 07:50:10 -0800 (PST) Date: Mon, 22 Jan 2018 15:50:09 +0000 From: Lee Jones To: SF Markus Elfring Cc: linux-omap@vger.kernel.org, Tony Lindgren , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH 2/3] mfd/omap-usb-tll: Improve a size determination in usbtll_omap_probe() Message-ID: <20180122155009.je377sf325rva7y4@dell> References: <49a9d036-ab90-4342-90a8-db63e027017e@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <49a9d036-ab90-4342-90a8-db63e027017e@users.sourceforge.net> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Jan 2018, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 15 Jan 2018 13:43:53 +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/mfd/omap-usb-tll.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c > index 7945efa0152e..c8b4ad40910a 100644 > --- a/drivers/mfd/omap-usb-tll.c > +++ b/drivers/mfd/omap-usb-tll.c > @@ -220,8 +220,7 @@ static int usbtll_omap_probe(struct platform_device *pdev) > int i, ver; > > dev_dbg(dev, "starting TI HSUSB TLL Controller\n"); > - Keep the space between. > - tll = devm_kzalloc(dev, sizeof(struct usbtll_omap), GFP_KERNEL); > + tll = devm_kzalloc(dev, sizeof(*tll), GFP_KERNEL); > if (!tll) > return -ENOMEM; > -- Lee Jones Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog