Received: by 10.223.176.46 with SMTP id f43csp970542wra; Wed, 24 Jan 2018 08:37:30 -0800 (PST) X-Google-Smtp-Source: AH8x225D26M0QfJ6hHBEOVSv/pZ16LtppYJuzjdZrkj533uvbHNUAqcnCetY65X4ENl1Cf9VUnZ+ X-Received: by 10.101.67.193 with SMTP id n1mr11147128pgp.116.1516811849954; Wed, 24 Jan 2018 08:37:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516811849; cv=none; d=google.com; s=arc-20160816; b=Z2Zkr/qlTUoW5izdBUHScoR7zEx7oPmoXDd9CBuzu1loNZzxsNBNdVephE5fy2ydc9 3FbBVXuCft3k3FmVWKDnvkdtyfqIEYYKRchpK9pO4tEdxooex3PHoYMTL92kK2P+45Zv mvaKtsEXQjPxIpYDYRgNnd6CyUOREd4ThbI0dyNZiOuY747iIwDXZRKreUpn542uxWV6 hkvEen7cgVTu0EuYl92QIEltzVSFKI+GgIwTByydrzh9sm5ZVoVzANP9gsyPdz8N7JlO Mn8eGnN5Km68fxNjAwoyaNTue3uB982bAJFRtAltADU9q55KiZeczDy0RJwBrtBqqlAz j9CA== 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=wqwZowuHYeyuTVSBMHDFP8R6BFZcR7Xrmj2h+ir7MOk=; b=pH1WkzqXWBxHhilCxaB6BAqpbLrr5kSo5dqL9EClXUihfv/pJy61iLZXlaf3RxXAet xpIpa8t6rgO7xdHGCXBE6MJryBQDoYfURWDYfpQNIxblLWjdkDqZmMb2RHGxam7haT2S yizo8lzNDMGm9xOsP+KUazjOzzmEtXMLATB65p23hBRztTQEFUWOG/GPsl6XLVNta7lN 5eaHDppy7H/ZnX4AkSYqvK9iF/qKbjeNvH4Nu/0Lt83gp+2QeZXBew8y+gMkETK9I4gr +5UydSVYvBNCys6C0OpHs7e/ELPFvQxtkfnXp/R6ygnC5MSuMJfeuWncfM4e3MXu9jiT HcGQ== 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 p24si3111205pff.76.2018.01.24.08.37.15; Wed, 24 Jan 2018 08:37:29 -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 S934307AbeAXQfw (ORCPT + 99 others); Wed, 24 Jan 2018 11:35:52 -0500 Received: from mout.web.de ([212.227.15.4]:61291 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934249AbeAXQfu (ORCPT ); Wed, 24 Jan 2018 11:35:50 -0500 Received: from [192.168.1.2] ([77.181.242.198]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M5Oql-1f01ql0TxX-00zV2e; Wed, 24 Jan 2018 17:35:48 +0100 Subject: [PATCH 2/3] Input: apbps2: Improve a size determination in apbps2_of_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org References: <50013a33-b7ca-fce1-9769-bfe3db850a8a@users.sourceforge.net> Message-ID: Date: Wed, 24 Jan 2018 17:35:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <50013a33-b7ca-fce1-9769-bfe3db850a8a@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:w16gEv4rHxgRW1P2E+UQqKzcADHybN/Pgmp2BncLzcZbs5TTJaJ LhVOQ2EnxJY3RM7EFo+lQ/2bYaluAeSHGnBSdotZO8mfmsBsrv1yJJYs66lVTLTfdwEpElZ GZv5J5YItiSJKCPOr7ni3qnH5DlGMUr/DGIY8YgZBqox71nEtQXRZeJIdrvNHvf7xL+AELs EgW07RFLhg6qnFH7alV4g== X-UI-Out-Filterresults: notjunk:1;V01:K0:8yxCBrSkgjo=:krO6OtZ9VO/PQC2Y/d3JsE r63nkDUSSO/4mUHBWSoncYgixR3Owbz4Lg+CLuEko0F3j2H9lcEDuGr+48WXfQpexMsRDuYKf 3dXgh9T2qS5lx99CZi6j68DMdH3pDjlXO+yCzyCCOUnP2/FB7L7VOZ3d6sXaCt+1F3S1SxpK8 otlsQgeU/4S+rGUcZN1U3tphQlMyf4eRZug+ldO7YkG7OhtZpQNdu0mcGlpCjkpLhd9JZplrC Lc9FkV72OnjlCBqPY9DrTI3c1ETDwAzMp40JZ18gNBlqVIaINuhsF8Ux11TAm8hsoV1a2IEXT FzcoYSngEYU7lCXnmtesKgzP6zsJKSXD6hT4uimi06Mb7tRw9ibszDoeFfEEpZ5u1qj4d2Sew 4WX+7uVsBxBrI0bUeLFx95W4vfopY5DvquESF6HuouwugNdlNsfUOK3ZL7QeqlIxrSD3xHUo7 ACRL1XcKZVgFAlT0F+NvBz5VJgdwk7254YmCxfxdNvTXqWULzvdDpVtI0C5dmhpLQs5rk08GE V4nrBKA+5ss3pdZUchNBXq91vvqLvBr5rw35JKiYvuOB2snMPKZe1H0uNHrH7smz9hwpmbG5m j1m+FKS4YfGP4htAnGU5wUFmWYz2wflj92+L0U5UwcU89oo82v060Vs8vnGF0f1DzW93t+Otd N4av/3BGUX/e5q8R+v/ER2u4wmzlwo8n9EhwIUGRNq0W2d8Pz5Tj4MIewB4VekUzYlEcyKShH EZLzUO/gCqqhLS5f+dgEXAuBeT6TijTwAs0Kl6TI3WRehOq0PzMrwdQ4CjtrpACtjSe+E4Z69 lqVxPfbRo/yt+99w+PPo1aSN3RAreMoBxqF3QCdsPdK9lIBVXo= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Wed, 24 Jan 2018 17:15:39 +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. Signed-off-by: Markus Elfring --- drivers/input/serio/apbps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c index 9b75c4e1bc13..a1c64df3b6cb 100644 --- a/drivers/input/serio/apbps2.c +++ b/drivers/input/serio/apbps2.c @@ -170,7 +170,7 @@ static int apbps2_of_probe(struct platform_device *ofdev) /* Set reload register to core freq in kHz/10 */ iowrite32be(freq_hz / 10000, &priv->regs->reload); - priv->io = kzalloc(sizeof(struct serio), GFP_KERNEL); + priv->io = kzalloc(sizeof(*priv->io), GFP_KERNEL); if (!priv->io) return -ENOMEM; -- 2.16.1