Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1003077iob; Fri, 13 May 2022 19:16:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLADmIFfBbWCRV+UQaoRxN2FQ3suGqmPLd2+MPY4nhJw7Ttac2mS/h793AtdBV6fRO3swT X-Received: by 2002:a05:600c:3ba5:b0:394:6a82:8dbe with SMTP id n37-20020a05600c3ba500b003946a828dbemr6727288wms.185.1652494565081; Fri, 13 May 2022 19:16:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652494565; cv=none; d=google.com; s=arc-20160816; b=akQSTARYRoznDV+iVuFApq8SFgepRGcOR764ZXwPMeY9arkj3fobvywWM7GTRDAi2P rQJvKdt81jBaIfnUuEDPlKCBpTYKd6by8O0vujp/OeevhHpI0+ce4Yon8hSMA/D1whs5 z+ic3y+PAZd3Y9fQfRvi1cUhRHo6FmX8wNdfnCkjZZITyWQPbGFTg6++Ln2xQEjHM89i +LaOjZdoHI9xAONZU2LBwF6K3KnOlvAFi0XhShb9PoZN68A77mFyWB1eMRLSfgem8QeM d7o5NWoYpHWvUNhMNPlxAz8Bd7CvO8IO1nBCBeUn+WBpZ9yQZBSdbVM3uN4x3+EWoGTA KEng== 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=UB/vsMarSif/blb5JQHk323snD8OC+Vu7nK70xhTsZa/CS0rpXDP/P9ENJu6xDOqy5 PLdtwETY5tR+XfUZg5IXX22rPxEhG/H5NhfExoq6I4p5tZ1wpIJIwEBLy6mYlnjOUGAS HD/Sm8438JZiGQBZzj70gVoAcdI+1YzlWE/MGyHAbvPjUCDaxCsrFFbDZcLOExwAUdGO BnA8fUzupkBUgvKoc81rJlrcCCQXxFgt1aSBofmNgzKd68Li3qSCJLeNqnZy2wWGkR5H u4PON2iLos2juL1ID+9JCae6bYHCI7WE74qiJ8Ykl/0/+B4xWiTs++5YypIcCrB7mFvN yNhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gZ6Ul2hk; 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 o13-20020a05600002cd00b0020a792518f5si4939354wry.529.2022.05.13.19.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 19:16:05 -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=gZ6Ul2hk; 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 B5A4B32E5C1; Fri, 13 May 2022 17:33:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381015AbiEMObx (ORCPT + 99 others); Fri, 13 May 2022 10:31:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380912AbiEMO1c (ORCPT ); Fri, 13 May 2022 10:27:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1C1A6898F; Fri, 13 May 2022 07:27:20 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4D8B6620B5; Fri, 13 May 2022 14:27:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 528ACC34100; Fri, 13 May 2022 14:27:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652452039; bh=DZThhwGH7bPrN9WSWnDNPcHaOWX86Na7gdrSEz4sffU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gZ6Ul2hkqWulafKaZXr9ASNpkBPUGLbnMZVKYsqw0MKSYcc2Ov2vXlC5VriOJxNEM lSkMIUSzcUfhjUKd2EITOeOmjRzhRxp63HK7UaQMLHMfBO07fmB+fIJU6XtZmCgLM/ qK8EyqJbtxVDYSMdwh2RZZak7DP1iBF6bJ37SGZY= 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.10 01/10] MIPS: Use address-of operator on section symbols Date: Fri, 13 May 2022 16:23:45 +0200 Message-Id: <20220513142228.349106735@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220513142228.303546319@linuxfoundation.org> References: <20220513142228.303546319@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);