Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1040302iob; Fri, 13 May 2022 20:42:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZAiepGENMNl7sa6hZv20GGujQE8/jsi3ltP7stH/g94xg0XTo9ffiDobyTsm7KQD5XLbL X-Received: by 2002:a7b:c842:0:b0:394:8d6c:2768 with SMTP id c2-20020a7bc842000000b003948d6c2768mr7131911wml.205.1652499749146; Fri, 13 May 2022 20:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652499749; cv=none; d=google.com; s=arc-20160816; b=pbAIvWRK29KPLH8P4gCdE7d5CKah0nPOWKNq9/gCSmYPEgkDhuz8giEpfalg06R7Ac xC+pVuRE6eXRqEDWI6FawFOlWELaS8JNlp2p2+M3ZdzCDDKKdakCihXIVWc5ZL5kF2AN qMXQ6WX9tEiLrgtV2Uu7vqM3uhjtUzS+5sxQOQYdr7IY4Wl9TQZ6Yh/Dp67G1Y0y4nyN tx6c+XBzBsm/2RmVEf8I6LfohhDXdOKwQP5nPjBcaJ74n5k17Flw3mFCa39uwdM1PFag a5rpvCbVeZLzfQCHzGmBgWEIJ1fx3jgSQOGMM77MSDhbCUbNg75cA8Qlp+4peTPAwhtM ikXA== 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=q78Ch0+3Eygwc8N/TXFKBRTAgDgT4OrKZP7JQp9h4Z8=; b=s+4W6fAPy8T6KoO1L8hXK9uc7Gr64wfIz/YJhg6OQd4SXq5N4dN35527b2yR9WmTsB a59F49oC/2Q+Au4+bkGkydx9F13OxnOtGyUZeqJfAd+ELa4E8ucrTfiOUC699OyGScIv 9UrtNvfd56D0ehdnSIFktklj9pyxufy1WRYybzBHOqwoF18fAo9odVl/bcmXXMEcMo3T aU5i2fb9c+HorscjiN/++1XVxwnAsmbTmlSQ+UeazgwGLtHI3+OXmL6mQEzJijeqU+fo gtDyhzRX9u+ZB+pjwLxv7ygmy8SWSFXINnLEg9YtOyUxvZiFDygADRSfGhz4vtoNNMA6 NaKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Qd2Kh6VO; 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 b3-20020a5d40c3000000b0020af656e965si3480660wrq.622.2022.05.13.20.42.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 20:42:29 -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=Qd2Kh6VO; 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 79FFF457D38; Fri, 13 May 2022 17:17:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355450AbiEMOY2 (ORCPT + 99 others); Fri, 13 May 2022 10:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355654AbiEMOYZ (ORCPT ); Fri, 13 May 2022 10:24:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D200050B1C; Fri, 13 May 2022 07:24:24 -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 6110761F99; Fri, 13 May 2022 14:24:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05119C34100; Fri, 13 May 2022 14:24:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652451863; bh=pgmlDEK3VnwrJoM5kMd8UWT5gPluDNUCz7SRYnTdRcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qd2Kh6VOAWqO+zYcvoXVvN9kZWS83xjYFNAAdLRfNZkbco799CEukeTukycr87qSU uXwU2y4ziqS9c0hc9wuJslU5LTGE8XjAJlfySGNptFSvPc5CQhJ0sHANnn7ZYEK3RO RL/RWGGANOqVgJUFuGKOL23PosakMsPrZ/g/5ivY= 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 4.9 1/7] MIPS: Use address-of operator on section symbols Date: Fri, 13 May 2022 16:23:16 +0200 Message-Id: <20220513142225.953417330@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220513142225.909697091@linuxfoundation.org> References: <20220513142225.909697091@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 +- 3 files changed, 3 insertions(+), 3 deletions(-) --- a/arch/mips/bmips/setup.c +++ b/arch/mips/bmips/setup.c @@ -174,7 +174,7 @@ void __init plat_mem_setup(void) dtb = phys_to_virt(fw_arg2); else 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/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c @@ -76,7 +76,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 @@ -36,7 +36,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;