From patchwork Sun Apr 14 04:49:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 10899685 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19B1F17E6 for ; Sun, 14 Apr 2019 04:56:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E358528A57 for ; Sun, 14 Apr 2019 04:56:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D244F28A6A; Sun, 14 Apr 2019 04:56:56 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 E824628A57 for ; Sun, 14 Apr 2019 04:56:55 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=AETwaF5NQF360dRTVhkCOMvv//84MeqRD4nQgMqC6Fc=; b=jTV SMt4uoldEnGHSl6K3xzGbYIZ9aIz1734wMX/OvmvzUsax1+2ngBi+c3PlSv77UnW+oYXfekkWi2pa 6g/3/hMj+RdGfVLsCqiwpDesDfNiN6lndHn3nq19HGTT7QkzmtGUb3MVb1TXBaHPfDxOhgYWXPQ/I khCkWdLjJvnQREb9P0jB4NTABfjiMUqn7mLXl+Vqz53t/qBpttTwjaNDi0hrLkXQCDeO0Jl8dfBC0 TLn3w1eymfHjQlBWiYOU43JlCPpw9HeU7qe7bac4NGKVpqTV7qoP5IL18ltJ6CoLwFy875sZvo7AM DiQ5K37791f9mK+ZV163GieZ2MJQtoA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFXCE-0007by-Cy; Sun, 14 Apr 2019 04:56:50 +0000 Received: from www.osadl.org ([2001:a60:9266:ffff:62:245:132:105]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFXCA-0007b7-KV for linux-arm-kernel@lists.infradead.org; Sun, 14 Apr 2019 04:56:48 +0000 Received: from debian01.hofrr.at (178.115.242.59.static.drei.at [178.115.242.59]) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id x3E4tDwi021036; Sun, 14 Apr 2019 06:55:14 +0200 From: Nicholas Mc Guire To: Jason Cooper Subject: [PATCH 1/3 RFC] ARM: mvebu: at least warn on kzalloc failure Date: Sun, 14 Apr 2019 06:49:49 +0200 Message-Id: <1555217391-3552-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190413_215646_972374_A31A1F43 X-CRM114-Status: UNSURE ( 9.68 ) 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: Andrew Lunn , Gregory Clement , linux-kernel@vger.kernel.org, Russell King , Nicholas Mc Guire , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth MIME-Version: 1.0 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 Although it is very unlikely that the allocation during init would fail any such failure should point to the original cause rather than waiting for a null-pointer dereference to splat. Signed-off-by: Nicholas Mc Guire --- Problem located with experimental coccinelle script While this will not really help much - but kzalloc failures should not go unhandled. Patch was compile-tested: mvebu_v7_defconfig (implies MACH_MVEBU_ANY=y) (with some unrelated sparse warnings about missing syscalls) Patch is against 5.1-rc4 (localversion-next is 20190412) arch/arm/mach-mvebu/board-v7.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c index 0b10acd..37f8cb6 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c @@ -128,6 +128,7 @@ static void __init i2c_quirk(void) struct property *new_compat; new_compat = kzalloc(sizeof(*new_compat), GFP_KERNEL); + WARN_ON(!new_compat); new_compat->name = kstrdup("compatible", GFP_KERNEL); new_compat->length = sizeof("marvell,mv78230-a0-i2c"); From patchwork Sun Apr 14 04:49:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 10899687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA5D017E1 for ; Sun, 14 Apr 2019 04:57:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEB8328A57 for ; Sun, 14 Apr 2019 04:57:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2FBA28A6A; Sun, 14 Apr 2019 04:57:01 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 6FEA428A57 for ; Sun, 14 Apr 2019 04:57:01 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=apKm7m9MHeuWU+LIK3Ir1AVjhJxpL0OG9/7kVdvaCkU=; b=P8koQI6+IaZIpuPMSbgMu9S4Gs TenmTTSVBu5a+SnjnGzzRSkeHK5LXjRU2SIprHUcO4k6DhYKq91a3d6VPFELlrxDKE65dd61lwlVR dQO6bgpYYnglL33/lQOZCcddsX5qxFjhzjyeas+ogcT/I+B3BoplMk9TYA8oTjbI1gDJinJUMoA+e eRbPwzQZdBmTb25zSD2/zxK8VYqrFNt0zwQS76un52yfAKArGHGqDfsBCksQd+wBEhd8wjgj+R+FS 2VXyl3NW+BcS0Y7IjqBF0GHlLkgikMshT9lL/3RyT/X1A02oDDyx3gyrdzvlKGhE5KaWGW72KcIQJ buaK1DiQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFXCI-0007f9-Sn; Sun, 14 Apr 2019 04:56:54 +0000 Received: from www.osadl.org ([2001:a60:9266:ffff:62:245:132:105]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFXCA-0007b8-KT for linux-arm-kernel@lists.infradead.org; Sun, 14 Apr 2019 04:56:48 +0000 Received: from debian01.hofrr.at (178.115.242.59.static.drei.at [178.115.242.59]) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id x3E4tDwj021036; Sun, 14 Apr 2019 06:55:25 +0200 From: Nicholas Mc Guire To: Jason Cooper Subject: [PATCH 2/3] ARM: mvebu: drop return from void function Date: Sun, 14 Apr 2019 06:49:50 +0200 Message-Id: <1555217391-3552-2-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1555217391-3552-1-git-send-email-hofrat@osadl.org> References: <1555217391-3552-1-git-send-email-hofrat@osadl.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190413_215646_972365_2B424C49 X-CRM114-Status: UNSURE ( 8.16 ) 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: Andrew Lunn , Gregory Clement , linux-kernel@vger.kernel.org, Russell King , Nicholas Mc Guire , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth MIME-Version: 1.0 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 The return statement is unnecessary here - so drop it. Signed-off-by: Nicholas Mc Guire --- Problem reported by checkpatch WARNING: void function return statements are not generally useful #141: FILE: arch/arm/mach-mvebu/board-v7.c:141: + return; +} Patch was compile-tested: mvebu_v7_defconfig (implies MACH_MVEBU_ANY=y) (with some unrelated sparse warnings about missing syscalls) Patch is against 5.1-rc4 (localversion-next is 20190412) arch/arm/mach-mvebu/board-v7.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c index 37f8cb6..28fd256 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c @@ -137,7 +137,6 @@ static void __init i2c_quirk(void) of_update_property(np, new_compat); } - return; } static void __init mvebu_dt_init(void) From patchwork Sun Apr 14 04:49:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 10899689 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1536F17E1 for ; Sun, 14 Apr 2019 04:57:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED4B928A57 for ; Sun, 14 Apr 2019 04:57:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE87728A6A; Sun, 14 Apr 2019 04:57:14 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 946D228A57 for ; Sun, 14 Apr 2019 04:57:14 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=n+fG4olfq1/Czfyx7zStAlq+NtM9tH+3s+Eu4FqSQ5E=; b=tqZk+ljGEmluBdeRpp0p/MeE2c jvePUlVX+wcKfHC7th6FK0XD3R9X9CGiPklzkDrBDMT+Nq9cpLWjzCFc9dXzXsgyo7pQzRC/VIZ84 pRLGTmRBXq9LfUtAvrjfeR9kCdPm23xtCT7khtXtIac1WzZa5DreqeJOdYC9/wJvEof66FS0I2dFf Vc7ApMLtfnO4JpIZAyU6eLuk386oEJjQoI4hN0lmSM6fDxBBlj9S/H2imP+bYVqRHx8U31vTqSt3L HV3S6z6TgDcXV4A5924U4O5CJmy/tf7DZuhPNdrC6wnU6WeSgu9wY4/7DuXIMpysr+htoewSRnZDw sQJFcDPg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFXCb-000846-SP; Sun, 14 Apr 2019 04:57:13 +0000 Received: from www.osadl.org ([2001:a60:9266:ffff:62:245:132:105]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFXCA-0007bC-KU for linux-arm-kernel@lists.infradead.org; Sun, 14 Apr 2019 04:56:50 +0000 Received: from debian01.hofrr.at (178.115.242.59.static.drei.at [178.115.242.59]) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id x3E4tDwk021036; Sun, 14 Apr 2019 06:55:33 +0200 From: Nicholas Mc Guire To: Jason Cooper Subject: [PATCH 3/3] ARM: mvebu: add SPDX license identifier Date: Sun, 14 Apr 2019 06:49:51 +0200 Message-Id: <1555217391-3552-3-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1555217391-3552-1-git-send-email-hofrat@osadl.org> References: <1555217391-3552-1-git-send-email-hofrat@osadl.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190413_215646_973421_416B3D69 X-CRM114-Status: UNSURE ( 7.33 ) 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: Andrew Lunn , Gregory Clement , linux-kernel@vger.kernel.org, Russell King , Nicholas Mc Guire , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth MIME-Version: 1.0 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 The license is clearly identified as GPL V2 - so just add in the appropriate SPDX license identifier. Signed-off-by: Nicholas Mc Guire --- Problem reported by checkpatch WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: arch/arm/mach-mvebu/board-v7.c:1: +/* Patch is against 5.1-rc4 (localversion-next is 20190412) arch/arm/mach-mvebu/board-v7.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c index 28fd256..0e021c9 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Device Tree support for Armada 370 and XP platforms. *