Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1008202iob; Fri, 13 May 2022 19:25:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH9qZUNGw0cdS+bqurGsbZ3ypaG3hW0+l632jVJyWv4riX03xZzDVQ4gsQjmYZJe4DY0q9 X-Received: by 2002:a05:600c:6005:b0:394:7ba4:5e62 with SMTP id az5-20020a05600c600500b003947ba45e62mr17680916wmb.25.1652495130523; Fri, 13 May 2022 19:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652495130; cv=none; d=google.com; s=arc-20160816; b=1FDIBhwzqZ23LLQPOO4iuqxLePCGIlfV2yATY+13zz93ez4qAnfMW49UToNz00aTjl SglmnNKza+vLgPfqYHtbNCY0vboJ9X4Pps35+o+0Jwv1ov9ZTAYyAjKMARi6B06FPZbf 2W5ZYvxoJSWt3kZ+E6yFEFDCzmyKpe6YBwMbH/YeoELV2HzQkP7AF5CumpjRuEHXUuNM jUiAr5+JcHhyNb0eKED3VgSxAuSKKpRcY+zSQiV19ie8wyj/4wBqe/TLIwBFYMnGSZe3 7ie9PRMXyfWHpcLSspe8fukYfnAiJE75/8dbuXNVBDrjn7YPoTONlJE+gFeOVSY1WbCg 5TYg== 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=uFaffdHX4arbqUEQGJl65r/h09emQGRm0c8Udh+wMcE=; b=iPBcv2p5CkzTWdueD8X79BUwrUxQw6NFsP5iyXnNHNJNKYuEE4h6ytgYx/hik+oK29 19CNw1yFrlKtRqPyA0qlpJxme86mLdN7+fjnsx02ddDZ55urWfKXeKQ+XcZr/3Hms1EK x7iuEq96OEBwtyJUjwjKEOH/3RjR3SBFlXN/VuvHGh/YG8Lu/6QouMGFyVk3jAfv3Zxx uR/7FPIWD46nC4fNIKQaqq29s1rHEbpvKQdN+BJwwDxwZRYtkIJsOU7zQtUiP/Qprb1E TKeQh6eBBqAjL6GSX32EGs/b8dglPDbKg2yd6YA6p7rlwORATsFc+pxQt7XaibXKk06B 4M7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hDDNLegc; 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 h10-20020a5d4fca000000b0020a7e29e170si3320352wrw.201.2022.05.13.19.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 19:25:30 -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=hDDNLegc; 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 26C534CA246; Fri, 13 May 2022 17:40:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377244AbiEMOZo (ORCPT + 99 others); Fri, 13 May 2022 10:25:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379132AbiEMOY6 (ORCPT ); Fri, 13 May 2022 10:24:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E46805E758; Fri, 13 May 2022 07:24:50 -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 7BA16B83069; Fri, 13 May 2022 14:24:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6235C34117; Fri, 13 May 2022 14:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652451888; bh=n7TtXaBFz/LmgXn7fOo/p0dEerr3wEwVJiOgyCRxc5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hDDNLegcBSPzLpJKrn2UFw4ckktuIotCyrUaPsyhGHrn/+OfrRun2xNM7wtvfY9bu Jc3KhGvB4xCC8hlhgRVt7AK1VCKEAxMLC3waq+ZF25w4s+jVJNrJd8lfI/Z6AMeJcH yy8bwLcBrjE8dZ0jgPL+ewHKkzthfPuzvJ0nM6ok= 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.14 01/14] MIPS: Use address-of operator on section symbols Date: Fri, 13 May 2022 16:23:17 +0200 Message-Id: <20220513142227.425984175@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220513142227.381154244@linuxfoundation.org> References: <20220513142227.381154244@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 @@ -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 @@ -82,7 +82,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; --- a/arch/mips/ralink/of.c +++ b/arch/mips/ralink/of.c @@ -79,7 +79,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);