From patchwork Fri Sep 8 20:52:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9945023 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 95BF5604D4 for ; Fri, 8 Sep 2017 20:53:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87257205A4 for ; Fri, 8 Sep 2017 20:53:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BFE728915; Fri, 8 Sep 2017 20:53:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0A1F1205A4 for ; Fri, 8 Sep 2017 20:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jAkxw1l7eEedXDAn13CCtcRsZ/fviQkaswziIh6wIj8=; b=s+2t8wYvoAkX2W 37Jb34SPUCTs6KCiihY/y98cBD9s9Be3//xSditlQiJpDlyAV7WE0gTb4Uy1MV6um5q+kE4MfEiJk djkoMjxgBy/8Oo4KxaxtC1GPWKWD4+prdZVvMG9iu5Uu6tUIP42SnTxTYfPB7qe2HuIOp4thTCGwg 8q9c078EUorgfa7O+/LeB8IDfkyX1jLy37FI+lMqHnmwXF3Hta10zNImGV6Fa1W/3Lu99vMNZEje2 6i8HFKC4ODdRZOfkT6I4MsIFMw9vm2fu7hsnWchBMsz4k2D/d498LXWyc+Z8B40jJfcyYko5MdUd4 ECgwS1TK815dwcKPDGYw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dqQGv-00017p-NF; Fri, 08 Sep 2017 20:53:05 +0000 Received: from mout.web.de ([212.227.17.12]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dqQGr-00013Q-3u for linux-arm-kernel@lists.infradead.org; Fri, 08 Sep 2017 20:53:03 +0000 Received: from [192.168.1.2] ([92.228.166.205]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lhvlm-1d3fBS19Eo-00n5KU; Fri, 08 Sep 2017 22:52:32 +0200 Subject: [PATCH 2/3] [media] s5p-mfc: Improve a size determination in s5p_mfc_alloc_memdev() From: SF Markus Elfring To: linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, Andrzej Hajda , Jeongtae Park , Kamil Debski , Kyungmin Park , Marek Szyprowski , Mauro Carvalho Chehab References: <482a6c92-a85e-0bcd-edf7-3c2f63ea74c5@users.sourceforge.net> Message-ID: <003abb1f-4dc6-91ca-9d03-cae13dc4ff6f@users.sourceforge.net> Date: Fri, 8 Sep 2017 22:52:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <482a6c92-a85e-0bcd-edf7-3c2f63ea74c5@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:6VemIDPuFiCtm/88OYBveSuRzRal9WdesAXet13nnYg8WOhp5MD GUGMl/BKrKl3hJ7CCnvs+ZKbODk5R3Cp7cA1s1OhJPjBXls2HQlDtiewgBq0FhBnBGyXyAD 3rIlh1n75tmLbobglvcQ0Yyat4dJopaOXsCniVQr6iW0+8UBfG1BOvwUBfF3oi8xIqcyN+R 5Y6fj/SyokcPfK1Tr11UA== X-UI-Out-Filterresults: notjunk:1; V01:K0:v13Zv+nBrfw=:u32zxPzK7O9Ly0lXhvsBO6 CO4VEajzce3YU3jUscJBmS+qjXIzOhoq5+vDcUDZeYQ7+2pjLKRKGgQ6pvBNW/VuxOzjl0GUQ 0+jHQHp+5fKFtE++u7c8aT/UG3jGVGXZcSb2U9+H1DW/1hVbyemLN4yhD06GzIO0divloj0vF SYBY7ieF39yjLfx3oKJA/KGEdVHfKkZfZPX3Uf8/to4dq9YhUlmRt6ToFrzTbXDfcbQppF+bH eKD3S4CxOR2Dgu7G3lHb5DnzuNNX4X08x8T8hYj3+qWgO/azYBepPicAAsnByeHi+hG7KMrxh OWFBwNRfeukgU6tLk2g+cL6LRpZqMc6kNuGo1XDEQhPAGyG6HJdY1LaDP/Pmcc6kb3i5UOuV8 wDqp3LNOXOlle1XapnsHehpc4jsT4VzbIkdJfZU3KBahhpN4d56bIsPa4U/qFqTBXvIqktckB q7vNkdHVpsRM10RvaZYWMddGEuxZP2rJrUCuMprR7kyYRX/g6Z1HZktu7bGOqzImKVmDzbHAP 76td8oeIhZcw1rg96EFHmSbsB6eaIdkCmrvjaWn1wmHWXWPRCHHnduhLKhyXepGBwQykrKWQb 25ypK4EiyYd3ROj4BCdIvHL5xf30Q6pJiI+6eD3aLqgOVxaCpvZJRJQI/ByiFAstEJyKw7bMT odLkErmG3XmdhtyzudSJJfpkggh39eY22Dk+JkPmsIfYzGA5+Gwdec+asM0KMvtg7aGH4iFuP QFyxz0spsw4jCysS7GBbfhVp14nU3mncrDpkRgg73D3cC3KfMk1vGJYGt7X+ohq7bXoSYxwLL wTkz/D2FCAQWcTh6yGIqmwhzSgNpGLewbboLTbp15poBXIrunc= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170908_135301_683389_BB74A2F2 X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Fri, 8 Sep 2017 22:30:09 +0200 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 Acked-by: Sylwester Nawrocki --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 8af45d53846f..abfb70b07032 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1083,7 +1083,7 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev, struct device *child; int ret; - child = devm_kzalloc(dev, sizeof(struct device), GFP_KERNEL); + child = devm_kzalloc(dev, sizeof(*child), GFP_KERNEL); if (!child) return NULL;