Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2495663pxa; Mon, 24 Aug 2020 16:16:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfK4ejhpw9b24YjU/G6vXRkyQPJQnB3Tvdc0tfyJdBxFy8AKuNDlRRMfviueSR7+t+7Nhm X-Received: by 2002:a17:906:fb89:: with SMTP id lr9mr3950493ejb.345.1598310989457; Mon, 24 Aug 2020 16:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598310989; cv=none; d=google.com; s=arc-20160816; b=TJHHOxx4MnW4RzlKIc6uqXvzzVp9p7WAUg1R9leaaL87I1LjKnApAiNcGbPZKTUOgO +wkWbY8KVXrf3Q6l2bbgrG4Klhfd5zqK5lFv5ASgd+o7/66PFqmbv1C17Jiyo1SwzR9e UMLXF+V5KOpHFX5oxMUmpaY3N49rJUPIY5Qb5Zgi/ooIvjHh8TnCmf8ueS8WjKVPpwv2 IWyd4v38qKy74PvA7Az8WY+TxirXuXQc3mtUmjwxfLOn1YArNyh5lSuY3q4SYoVo7+NI iQZpu0eeHYTu9pUk0A7A6aaoqOW7u+KHUU4VStvH8znBSO3VYTItfaxlA108MuOsLfrF x2Cg== 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:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=wvhSIR6sI74mxhT+O4Qx9n2lzpzuCK1cz1oQpYqGpNs=; b=lHuYg2+SCJ07x1NgyDFNzVKlMUxEEYL8w1DdrojGlgAtaDzDo5lm8cj+9WeglYFMjm 40LdnyHxm6eHhtionAV5wsOAX9EQeI7FEOn0ikSZQV214N7ZbkV1BFcS7/6Bq3PT7qzY wQ3RBd1jhzq4V8EtwyP093ISxc7G5jnHr00JlTZrqhQUep3KCQN+RW4cZ/tTBd2rXSrw CbbVW7GcMV6tdafpa8Y//qPP//S98VT3IQEpQn2w7ZOCPkvv5brRFoB9/WMeElIhJVtV kZHcgGMxpS1KF4ER9px1l7gHFjMBhgEt0c8kSqvVG7EJ1yvh7NhvNQGLSmVjmnpWwHl6 zLzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p25si3170943edw.562.2020.08.24.16.16.06; Mon, 24 Aug 2020 16:16:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728073AbgHXXNv (ORCPT + 99 others); Mon, 24 Aug 2020 19:13:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726090AbgHXXNu (ORCPT ); Mon, 24 Aug 2020 19:13:50 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43370C061574; Mon, 24 Aug 2020 16:13:48 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 5BC41129242A0; Mon, 24 Aug 2020 15:57:01 -0700 (PDT) Date: Mon, 24 Aug 2020 16:13:46 -0700 (PDT) Message-Id: <20200824.161346.1009201417411312987.davem@davemloft.net> To: natechancellor@gmail.com Cc: olteanv@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] net: dsa: sja1105: Do not use address of compatible member in sja1105_check_device_id From: David Miller In-Reply-To: <20200821222515.414167-1-natechancellor@gmail.com> References: <20200821222515.414167-1-natechancellor@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 24 Aug 2020 15:57:01 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor Date: Fri, 21 Aug 2020 15:25:16 -0700 > Clang warns: > > drivers/net/dsa/sja1105/sja1105_main.c:3418:38: warning: address of > array 'match->compatible' will always evaluate to 'true' > [-Wpointer-bool-conversion] > for (match = sja1105_dt_ids; match->compatible; match++) { > ~~~ ~~~~~~~^~~~~~~~~~ > 1 warning generated. > > We should check the value of the first character in compatible to see if > it is empty or not. This matches how the rest of the tree iterates over > IDs. > > Fixes: 0b0e299720bb ("net: dsa: sja1105: use detected device id instead of DT one on mismatch") > Link: https://github.com/ClangBuiltLinux/linux/issues/1139 > Signed-off-by: Nathan Chancellor Applied, thanks.