Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp995635iob; Fri, 13 May 2022 19:00:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz62T5THJO1pX9LaMBcZUAgIzxju6K4EeMpKO+nLYdMN3MNqlr7C0Rb89GZkwtrmEuF+DJg X-Received: by 2002:a7b:ce82:0:b0:394:2514:6f07 with SMTP id q2-20020a7bce82000000b0039425146f07mr6915527wmj.56.1652493633674; Fri, 13 May 2022 19:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652493633; cv=none; d=google.com; s=arc-20160816; b=rdyOcWSjELiatrAXixZmu5PPOFOmo2QxyS7DDN3WMlrQG2RFYy7xhhsgFeGBV/HGD3 9WDhRqCCte5cDHaW84kLdJZ+2rw3/J1ZmycwUsh6J/jeMJWrrktLb+5guiSFU0zk+FrC c2DUAHwIHdXKvZpOvM+7olWKgVW+Yq3uDQsu6JIzmJC3gKiqIBd/oz6zdJPnkfU+PHDh Lez69PH4v1bmAUm8UV/nbtS1p8F73QELDEuNxziT0tfU8zV8sP+UORExoZiZ1t2jh7LR cjxz14Jy5vyXezsakNUytKXdVw5RoVAAckVxrY69erjQSPLQGR9drDJ1u+D6EBH8OLDQ yAiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2ar9Y+nKr4UFpv/EuSr6rhj1auxVHEToSwVWS/VxbR0=; b=y2JT/v245NCN+KN2KPcKnpqkmzJC40Vwa6IwM3UceJBHwkWxfm7GweRif9/zOq2jKq Ek6XL3AHFsk370QuNny+ms7+kwss+7AMDcG2sFFTMjY1po9rlJy1Mlu0qYgU+nsGwHF6 fqQ4PCDGis5qcY+cpA/Ktjkqn/h2K2zgMNmsfcad+oPscmh52/hhlZA4kf4fDvGU4g0s yUrs9STWW8Dvw02lHlXzcijd0prv9d6BOCNRQdcQHqJ3y0Xxpin4ouzu8TuoM3LatvdK mpZYcJlVPwYlUjTcA24VC+XyZpcXQSuWBpQuhffyuYDXAlKy4jh/W+oEMK2Ab4NUHfTb dE7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uIHZzJh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b9-20020a05600018a900b002078c63d413si4765662wri.694.2022.05.13.19.00.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 19:00:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uIHZzJh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1784ED9E8A; Fri, 13 May 2022 17:22:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343671AbiEMO3a (ORCPT + 99 others); Fri, 13 May 2022 10:29:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381094AbiEMO0c (ORCPT ); Fri, 13 May 2022 10:26:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 046FA5E742; Fri, 13 May 2022 07:26:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AECC3B83068; Fri, 13 May 2022 14:26:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 028C7C34100; Fri, 13 May 2022 14:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652451982; bh=DZThhwGH7bPrN9WSWnDNPcHaOWX86Na7gdrSEz4sffU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uIHZzJh9BDTXAu8fAhgipYx/tgymHOQ+Ev39dCG5UqkF56U8KbjlPuNO4QazxUhs+ rUO705G2DD0Jtfnk98EdNQxi5pUtJYzSJE3b6sjJUq1AqV2F3rZaG09kn4CdLeZgMF gfl0FVR+dNKaIqC13K+4s/PrRd5GouNINrg+ObOg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Florian Fainelli , Thomas Bogendoerfer , Sudip Mukherjee Subject: [PATCH 5.4 01/18] MIPS: Use address-of operator on section symbols Date: Fri, 13 May 2022 16:23:27 +0200 Message-Id: <20220513142229.196868410@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220513142229.153291230@linuxfoundation.org> References: <20220513142229.153291230@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor commit d422c6c0644bccbb1ebeefffa51f35cec3019517 upstream. When building xway_defconfig with clang: arch/mips/lantiq/prom.c:82:23: error: array comparison always evaluates to true [-Werror,-Wtautological-compare] else if (__dtb_start != __dtb_end) ^ 1 error generated. These are not true arrays, they are linker defined symbols, which are just addresses. Using the address of operator silences the warning and does not change the resulting assembly with either clang/ld.lld or gcc/ld (tested with diff + objdump -Dr). Do the same thing across the entire MIPS subsystem to ensure there are no more warnings around this type of comparison. Link: https://github.com/ClangBuiltLinux/linux/issues/1232 Signed-off-by: Nathan Chancellor Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer Cc: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- arch/mips/bmips/setup.c | 2 +- arch/mips/lantiq/prom.c | 2 +- arch/mips/pic32/pic32mzda/init.c | 2 +- arch/mips/ralink/of.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) --- a/arch/mips/bmips/setup.c +++ b/arch/mips/bmips/setup.c @@ -167,7 +167,7 @@ void __init plat_mem_setup(void) dtb = phys_to_virt(fw_arg2); else if (fw_passed_dtb) /* UHI interface or appended dtb */ dtb = (void *)fw_passed_dtb; - else if (__dtb_start != __dtb_end) + else if (&__dtb_start != &__dtb_end) dtb = (void *)__dtb_start; else panic("no dtb found"); --- a/arch/mips/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c @@ -79,7 +79,7 @@ void __init plat_mem_setup(void) if (fw_passed_dtb) /* UHI interface */ dtb = (void *)fw_passed_dtb; - else if (__dtb_start != __dtb_end) + else if (&__dtb_start != &__dtb_end) dtb = (void *)__dtb_start; else panic("no dtb found"); --- a/arch/mips/pic32/pic32mzda/init.c +++ b/arch/mips/pic32/pic32mzda/init.c @@ -28,7 +28,7 @@ static ulong get_fdtaddr(void) if (fw_passed_dtb && !fw_arg2 && !fw_arg3) return (ulong)fw_passed_dtb; - if (__dtb_start < __dtb_end) + if (&__dtb_start < &__dtb_end) ftaddr = (ulong)__dtb_start; return ftaddr; --- a/arch/mips/ralink/of.c +++ b/arch/mips/ralink/of.c @@ -77,7 +77,7 @@ void __init plat_mem_setup(void) */ if (fw_passed_dtb) dtb = (void *)fw_passed_dtb; - else if (__dtb_start != __dtb_end) + else if (&__dtb_start != &__dtb_end) dtb = (void *)__dtb_start; __dt_setup_arch(dtb);