From patchwork Sat Feb 3 18:00:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 126782 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp648393ljc; Sat, 3 Feb 2018 10:01:14 -0800 (PST) X-Google-Smtp-Source: AH8x226bOvSCtzbZKwRL36Ve8ANxe8QikR5pQeHJDnbjXcVkuJE06p6EUqsb0qs6rWLl16Y1MQYF X-Received: by 10.99.123.27 with SMTP id w27mr34757100pgc.49.1517680874176; Sat, 03 Feb 2018 10:01:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517680874; cv=none; d=google.com; s=arc-20160816; b=P2/tbWsD84HggmJdCxjL70YIVpxTkI1StQp9GDwgpeosMVludSjSLCt7MMVe0sXYFX NR+AzD961XSYoV4lgvcqKA9p4ywQtNbdvXqRThwZb2pQmsqZAw7hPS+rRa1TydWh0a9d wpFl9+GD/A6ZN6/fPIC3ql3Ekp1cyu+7JtVTdkZEHlcpL8J+uz0j8RSUNTdSZVl01k9z lhP4LftDNb1gzLk0qX3lyCx1MzK+4Zy6/SVm/STbHBnVgjsrX76uTQM/ESohN7uZc03j bDAHRMnOhF/nrvRap8iiwBN5KQjPZbwdTZR9oPDZPFnS3xfWjeKx+PUIMWXqPsxqWdzl mLMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=iYRoQZqQhsPjjJ+DL4lggxnulfjr9NTJqMEg4zgHfSo=; b=KrOqzdfXYB5Tn58RSU7D1VP5NIwj9o1yMtsLqzldWgtxnUrHOIT+Q0M0zUaeKIkpV2 sAxS9zipEtscX/GwEw+gRuVDnyyL6xK7yfM4IZ0ygJcj1hErZUaND8IBMg1QXvBUbUA1 up86xf1GnQgaLVkYjBI6JHm43PCkH2RiD3QC4zIMFLEnUD5k/h1DXTEZHJJipSunKIrE kVX4UpdAAVNBWf/vLqu5lafktC80MKHtHoaSZCKHqpZmA4+VfDIIrjgr0YHzQM9PDo4W 7KFrOFFJ1ClPZZKCSFC+Rq2lVJUIc9qyUz7uIU9jIQ7CeqG26F6CvDxKqlIOTngOPBco 3P8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=X1QuL6og; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si3195482pgs.230.2018.02.03.10.01.13; Sat, 03 Feb 2018 10:01:14 -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=@microsoft.com header.s=selector1 header.b=X1QuL6og; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752815AbeBCSAw (ORCPT + 25 others); Sat, 3 Feb 2018 13:00:52 -0500 Received: from mail-bn3nam01on0138.outbound.protection.outlook.com ([104.47.33.138]:24890 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752701AbeBCSAh (ORCPT ); Sat, 3 Feb 2018 13:00:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=iYRoQZqQhsPjjJ+DL4lggxnulfjr9NTJqMEg4zgHfSo=; b=X1QuL6og1QbmYXfyXS1szt/xxep6WhfRJENTGARdodxsWsByYYOw4zD8iUg+bLD7EekD2gHVva3mQwMbtJk1HZB5Jt4u+/Hm6ovU/n3IaVGaDj7F4HN4Rh59nPB/19aiLgn3wS22s19uHMAUZVU4Y4YrWvVxlpFgGqG1lblRyRc= Received: from BL0PR2101MB1027.namprd21.prod.outlook.com (52.132.20.161) by BL0PR2101MB1043.namprd21.prod.outlook.com (52.132.24.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.506.3; Sat, 3 Feb 2018 18:00:27 +0000 Received: from BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9]) by BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9%3]) with mapi id 15.20.0485.006; Sat, 3 Feb 2018 18:00:26 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Arnd Bergmann , Alexander Viro , Peter Zijlstra , Serge Hallyn , James Morris , Aleksa Sarai , "Eric W. Biederman" , Frederic Weisbecker , Thomas Gleixner , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 002/110] exec: avoid gcc-8 warning for get_task_comm Thread-Topic: [PATCH AUTOSEL for 4.14 002/110] exec: avoid gcc-8 warning for get_task_comm Thread-Index: AQHTnRjeVAhaflsiyEOekqP+FhUEyw== Date: Sat, 3 Feb 2018 18:00:26 +0000 Message-ID: <20180203180015.29073-2-alexander.levin@microsoft.com> References: <20180203180015.29073-1-alexander.levin@microsoft.com> In-Reply-To: <20180203180015.29073-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BL0PR2101MB1043; 7:6XiaaNVSnhoOsQdRLH48DO2u1JGSrAmLX5vQdM+iRQ9fihGDSdOLQjqmSto85mfeVywjZaZKD3YhA+uVhAbBZu/+IjypQ1imPfDvBgK/gRi2oFi1sHO6YkK3L7B+eOCGJ4N1GiFNuSUTy5/MxgNUYkTNFqquMFu1jistdQZurANNUX2FFrT4V8ptE8AYRqgmnGF6rBBtJquL44+JrPwwKYiEjeUAMPiSmEUHnNo6dt1iDH0WXf2CEWGkeh5WVXnL x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10019020)(39380400002)(376002)(39860400002)(366004)(346002)(396003)(189003)(199004)(59450400001)(10290500003)(186003)(6486002)(14454004)(1076002)(102836004)(6306002)(6506007)(76176011)(26005)(6346003)(66066001)(10090500001)(5250100002)(36756003)(6512007)(2501003)(110136005)(99286004)(966005)(54906003)(478600001)(7416002)(53936002)(72206003)(6436002)(316002)(305945005)(7736002)(2950100002)(2906002)(5660300001)(4326008)(106356001)(86362001)(97736004)(25786009)(22452003)(2900100001)(3846002)(107886003)(8676002)(8936002)(6116002)(3280700002)(105586002)(81156014)(81166006)(3660700001)(86612001)(68736007)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL0PR2101MB1043; H:BL0PR2101MB1027.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f589e0f7-e9b0-4a13-ccf8-08d56b300170 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:BL0PR2101MB1043; x-ms-traffictypediagnostic: BL0PR2101MB1043: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(42068640409301)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3231101)(2400082)(944501161)(93006095)(93001095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:BL0PR2101MB1043; BCL:0; PCL:0; RULEID:; SRVR:BL0PR2101MB1043; x-forefront-prvs: 05724A8921 received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: MBbTuUXYRn4qyKd+eaH2bFFr8tMYDIclYvxYKuoaWRVrvXsxb16j6ja+qp8TGGp84VOVgn7a+FltNxAQLvJ/Dg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: f589e0f7-e9b0-4a13-ccf8-08d56b300170 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2018 18:00:26.4408 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB1043 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 3756f6401c302617c5e091081ca4d26ab604bec5 ] gcc-8 warns about using strncpy() with the source size as the limit: fs/exec.c:1223:32: error: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess] This is indeed slightly suspicious, as it protects us from source arguments without NUL-termination, but does not guarantee that the destination is terminated. This keeps the strncpy() to ensure we have properly padded target buffer, but ensures that we use the correct length, by passing the actual length of the destination buffer as well as adding a build-time check to ensure it is exactly TASK_COMM_LEN. There are only 23 callsites which I all reviewed to ensure this is currently the case. We could get away with doing only the check or passing the right length, but it doesn't hurt to do both. Link: http://lkml.kernel.org/r/20171205151724.1764896-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Suggested-by: Kees Cook Acked-by: Kees Cook Acked-by: Ingo Molnar Cc: Alexander Viro Cc: Peter Zijlstra Cc: Serge Hallyn Cc: James Morris Cc: Aleksa Sarai Cc: "Eric W. Biederman" Cc: Frederic Weisbecker Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- fs/exec.c | 7 +++---- include/linux/sched.h | 6 +++++- 2 files changed, 8 insertions(+), 5 deletions(-) -- 2.11.0 diff --git a/fs/exec.c b/fs/exec.c index acec119fcc31..0da4d748b4e6 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1216,15 +1216,14 @@ killed: return -EAGAIN; } -char *get_task_comm(char *buf, struct task_struct *tsk) +char *__get_task_comm(char *buf, size_t buf_size, struct task_struct *tsk) { - /* buf must be at least sizeof(tsk->comm) in size */ task_lock(tsk); - strncpy(buf, tsk->comm, sizeof(tsk->comm)); + strncpy(buf, tsk->comm, buf_size); task_unlock(tsk); return buf; } -EXPORT_SYMBOL_GPL(get_task_comm); +EXPORT_SYMBOL_GPL(__get_task_comm); /* * These functions flushes out all traces of the currently running executable diff --git a/include/linux/sched.h b/include/linux/sched.h index fdf74f27acf1..41354690e4e3 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1502,7 +1502,11 @@ static inline void set_task_comm(struct task_struct *tsk, const char *from) __set_task_comm(tsk, from, false); } -extern char *get_task_comm(char *to, struct task_struct *tsk); +extern char *__get_task_comm(char *to, size_t len, struct task_struct *tsk); +#define get_task_comm(buf, tsk) ({ \ + BUILD_BUG_ON(sizeof(buf) != TASK_COMM_LEN); \ + __get_task_comm(buf, sizeof(buf), tsk); \ +}) #ifdef CONFIG_SMP void scheduler_ipi(void); From patchwork Sat Feb 3 18:00:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 126792 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp671643ljc; Sat, 3 Feb 2018 10:43:51 -0800 (PST) X-Google-Smtp-Source: AH8x2269ONFm8aJTldM+u3oP1MhRBylq5yfo3zMUUr+nziVL7FHcXeYvXIVwV3EQnyvlx8gQ41tk X-Received: by 2002:a17:902:8691:: with SMTP id g17-v6mr39416113plo.446.1517683431422; Sat, 03 Feb 2018 10:43:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517683431; cv=none; d=google.com; s=arc-20160816; b=Dy0ZcGyDcbX6ADZSCiZwSmORli4ilra6J8fOhaf8izAIvKofvsfUwjzkDBQ8cjKLu1 A50zvdt16eCfRzcMBvn7TogID0VNO/AHfOR7cI/J3wZuoV44u6bs4EtHpiuLBGl7Lj2Q uAjm4J5pnw2C8Vq7t71KTLt9o2EqghW/6q8LWzjU2ugOVZFGr1eEiwSKn21r/3HatAW/ p3RyQV6zyOxa2eFb8MOAgJzC41vTqzLVbc7tZX0gdIetqWKWToO+patCC77gA2xQLdGF Vsv8btEbbJuutNcfm5tipWYqczl9ytZSc6t/rft8RRZclPInqJz+bkTYdjLBnxWC0F1z 0iAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FHbIyEyJwqnrE/evDvejxoXVdXbl70it2jlFc0peG6s=; b=Ldm/21/WifDx3hyD12IGM8bY/e+PlE56nyfvlOdiDHrpqGMz9u4o4U5UFeemqrB86Q CmZyVmY7AJ19W5VKdtq3SvpFN1wojX93RdgwNi1T9GJvfUsfv5TqA5O2YEHFeQFkR3TL iFZPRH5pdpNezHvvPg7DJPQ5u/S4dFSch/Of6oNLeBKEYoIxn/sW48HGLm0MZfsmWWin BgLe4nPWu4YNEgGOA8M6xRXhY8pmlwV5wRBYAfZhDjDYphzqZTnXfuy5sR2nE13LQzAE tVj+rPpzcYLZic6cdeTUW5Fn4btStrg4bgLRD5GJkPuHwuZdPYq/qXVztE3sIRW7fmte mC2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=CsEwVX6q; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 93-v6si4093304plc.515.2018.02.03.10.43.51; Sat, 03 Feb 2018 10:43:51 -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=@microsoft.com header.s=selector1 header.b=CsEwVX6q; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755222AbeBCSnt (ORCPT + 25 others); Sat, 3 Feb 2018 13:43:49 -0500 Received: from mail-dm3nam03on0124.outbound.protection.outlook.com ([104.47.41.124]:55488 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753193AbeBCSDA (ORCPT ); Sat, 3 Feb 2018 13:03:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FHbIyEyJwqnrE/evDvejxoXVdXbl70it2jlFc0peG6s=; b=CsEwVX6qqV8529bem2zf3T68GtZLSmiqv5jw6E/izpiTUU5vczuKFE/BryImrEFiZmvgBw0hFMNCMrGnTBlvyB4kOErrEt4PhKQKTU4p88blTKStY8gZkd0gDro8ThQv+erNt6ND8eU9uUkgKWKouK1vmQhtiZWnRJjuHeOl5TE= Received: from BL0PR2101MB1027.namprd21.prod.outlook.com (52.132.20.161) by BL0PR2101MB1092.namprd21.prod.outlook.com (52.132.24.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.485.4; Sat, 3 Feb 2018 18:01:27 +0000 Received: from BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9]) by BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9%3]) with mapi id 15.20.0485.006; Sat, 3 Feb 2018 18:01:27 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Arnd Bergmann , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 051/110] ARM: dts: ls1021a: fix incorrect clock references Thread-Topic: [PATCH AUTOSEL for 4.14 051/110] ARM: dts: ls1021a: fix incorrect clock references Thread-Index: AQHTnRju5uj24Wpr60ua9FEnfqnuGw== Date: Sat, 3 Feb 2018 18:00:52 +0000 Message-ID: <20180203180015.29073-51-alexander.levin@microsoft.com> References: <20180203180015.29073-1-alexander.levin@microsoft.com> In-Reply-To: <20180203180015.29073-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BL0PR2101MB1092; 7:YCV1lxKgOvT/ECYUNhODUH90c0kQXWk4XpVYbN5ZIfaiTc4++Zjm69pwm0G0dy/7FwZKj7+ppeehxx40g9C9m0s9Q9p9BM2AxrNp77MfwlfKNyFo5guTBRbldhMxNBA9JPJn+pA9ImBEzJWW2wh5Hk1PkhhhJjIAuIy0d5MLjg3g6Y8kD8L0UFUpq2WHw1PnjWmU408Wpg934LaFEZ4+pYeYCE7QQ8cilqAClHalak6SKGySWyFrzarMkNRq5wGW x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 518ea417-bce6-454d-1003-08d56b302591 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:BL0PR2101MB1092; x-ms-traffictypediagnostic: BL0PR2101MB1092: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231101)(2400082)(944501161)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BL0PR2101MB1092; BCL:0; PCL:0; RULEID:; SRVR:BL0PR2101MB1092; x-forefront-prvs: 05724A8921 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(376002)(346002)(396003)(366004)(189003)(199004)(3280700002)(14454004)(3660700001)(105586002)(3846002)(6666003)(22452003)(6116002)(99286004)(305945005)(7736002)(2950100002)(66066001)(478600001)(54906003)(110136005)(68736007)(316002)(86362001)(106356001)(186003)(26005)(59450400001)(6506007)(76176011)(6346003)(10090500001)(575784001)(102836004)(6436002)(4326008)(8936002)(2501003)(53936002)(86612001)(2900100001)(6486002)(2906002)(6512007)(25786009)(97736004)(72206003)(1076002)(107886003)(36756003)(5660300001)(5250100002)(8676002)(81156014)(81166006)(10290500003)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL0PR2101MB1092; H:BL0PR2101MB1027.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: opMr+8WU9qBkqifYcO2qOHqio++Wnape4KOLnEnacOb+Ml34XPIjmVxQ87dbdBcBpvLQMOLq5rppNs7DN7UhHw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 518ea417-bce6-454d-1003-08d56b302591 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2018 18:00:52.9096 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB1092 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 506e8a912661c97b41adc8a286b875d01323ec45 ] dtc warns about two 'clocks' properties that have an extraneous '1' at the end: arch/arm/boot/dts/ls1021a-qds.dtb: Warning (clocks_property): arch/arm/boot/dts/ls1021a-twr.dtb: Warning (clocks_property): Property 'clocks', cell 1 is not a phandle reference in /soc/i2c@2180000/mux@77/i2c@4/sgtl5000@2a arch/arm/boot/dts/ls1021a-qds.dtb: Warning (clocks_property): Missing property '#clock-cells' in node /soc/interrupt-controller@1400000 or bad phandle (referred from /soc/i2c@2180000/mux@77/i2c@4/sgtl5000@2a:clocks[1]) Property 'clocks', cell 1 is not a phandle reference in /soc/i2c@2190000/sgtl5000@a arch/arm/boot/dts/ls1021a-twr.dtb: Warning (clocks_property): Missing property '#clock-cells' in node /soc/interrupt-controller@1400000 or bad phandle (referred from /soc/i2c@2190000/sgtl5000@a:clocks[1]) The clocks that get referenced here are fixed-rate, so they do not take any argument, and dtc interprets the next cell as a phandle, which is invalid. Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/boot/dts/ls1021a-qds.dts | 2 +- arch/arm/boot/dts/ls1021a-twr.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts index 940875316d0f..67b4de0e3439 100644 --- a/arch/arm/boot/dts/ls1021a-qds.dts +++ b/arch/arm/boot/dts/ls1021a-qds.dts @@ -215,7 +215,7 @@ reg = <0x2a>; VDDA-supply = <®_3p3v>; VDDIO-supply = <®_3p3v>; - clocks = <&sys_mclk 1>; + clocks = <&sys_mclk>; }; }; }; diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a8b148ad1dd2..44715c8ef756 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -187,7 +187,7 @@ reg = <0x0a>; VDDA-supply = <®_3p3v>; VDDIO-supply = <®_3p3v>; - clocks = <&sys_mclk 1>; + clocks = <&sys_mclk>; }; };