Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3600730pxb; Mon, 24 Jan 2022 13:14:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLqJvOu/zUOPTiEjCg6leLx49Uwani/xEYyfFwPPW2j4EXq7xitcOfJwiFtCtCTvxuCOlz X-Received: by 2002:a17:90a:83:: with SMTP id a3mr102190pja.169.1643058845708; Mon, 24 Jan 2022 13:14:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643058845; cv=none; d=google.com; s=arc-20160816; b=fj9+aS2644E+Pz0kY0o40Wi5fg0h/c7U80H+J5U0jvuUb48P0UyrVgimqubctjTtP5 mX8uuw1GkyH4zV0nxzciBGNa0I+NhRD+bo6+l27oiwV5tkj7+bJ/NIrlMl4/qa6RFcb/ G4wgdHsJl1L/dGa9ByYrmoVfOodnwP4Rxe30VWcD2ipNBblgx2CXUlMg1Y3tWnKYP9Qu t+YiztVkd3Q4ODTEG+HJ6zc99S5GyYm5afCQ0LklYnxsiO8Ecf+RDmLMalAjVpEsHPJF yFvwfAsmVWBDfF1c9tW8Eb7/PbBkm/+oyHX/ooywIyBpc+DLAmFKm0Qg7VWt9tLCMIzL G2MA== 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=QNkQUfoyurmDcHLsXCHPmWaOG4EJjWwnEyUAHb1o7Ns=; b=SgKvrxw5YU+h2lLGgbJ9eBe1x1CYQSzozxuSkVMsZrax46mNjqCd9pzxK0CDDTHvgs WZ+94W+zySZbbWiXibYxse/yni0yar9ShuTrXUr3gtYGqwf0fWsuzJ/LMJPrGuQ9HjdS JjprUfw25WI8oZ9UNkx1Eg3kQ9vAXh4uKFk6iiEIlv1S00ORaxkXLUbIdZhp2NOLBQFa +BMS3GtBXkTv9uHTnk3Lrv44j4qGLFM2pTuRvKcEhceHnMp2vlfK4HCAXEuiPf0Rr9wp LtIR5RYsKior4tqiiRB1l1OaP+O5sqvhhiAonpcQldbUfcD2cyiYaBi2Sr9Q5bW8jZ2i Agsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OTcGpv+U; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si14433090pfu.240.2022.01.24.13.13.52; Mon, 24 Jan 2022 13:14:05 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OTcGpv+U; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388780AbiAXUkE (ORCPT + 99 others); Mon, 24 Jan 2022 15:40:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380332AbiAXUQK (ORCPT ); Mon, 24 Jan 2022 15:16:10 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44438C01D7E0; Mon, 24 Jan 2022 11:38:12 -0800 (PST) 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 D4CF96154A; Mon, 24 Jan 2022 19:38:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2FA2C340E5; Mon, 24 Jan 2022 19:38:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643053091; bh=Qf6XnIzeElSZlaTPE0+w9iFReX52uTDmquC2axMPOMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OTcGpv+U3vVVMP6IptEVcSy1u6Ww2b9VSEUNdUwwDExXm5ETLYAJTE9aDu6CsiYG7 vjmlBTOKXcxL4PEJASqJkZCmC+eDg4N/+yz8+RBvIOz9/2NPad9aHSjJb8CXAGQFKr em5b4fj8yplrQJLP1NeeJ12QmI4lsDTl6fcZPO5k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tianjia Zhang , Nathan Chancellor , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.4 241/320] MIPS: Octeon: Fix build errors using clang Date: Mon, 24 Jan 2022 19:43:45 +0100 Message-Id: <20220124184002.188735294@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tianjia Zhang [ Upstream commit 95339b70677dc6f9a2d669c4716058e71b8dc1c7 ] A large number of the following errors is reported when compiling with clang: cvmx-bootinfo.h:326:3: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NULL) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cvmx-bootinfo.h:321:20: note: expanded from macro 'ENUM_BRD_TYPE_CASE' case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */ ~~~^~~~ cvmx-bootinfo.h:326:3: note: use array indexing to silence this warning cvmx-bootinfo.h:321:20: note: expanded from macro 'ENUM_BRD_TYPE_CASE' case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */ ^ Follow the prompts to use the address operator '&' to fix this error. Signed-off-by: Tianjia Zhang Reviewed-by: Nathan Chancellor Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/include/asm/octeon/cvmx-bootinfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/octeon/cvmx-bootinfo.h b/arch/mips/include/asm/octeon/cvmx-bootinfo.h index 62787765575ef..ce6e5fddce0bf 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h @@ -315,7 +315,7 @@ enum cvmx_chip_types_enum { /* Functions to return string based on type */ #define ENUM_BRD_TYPE_CASE(x) \ - case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */ + case x: return (&#x[16]); /* Skip CVMX_BOARD_TYPE_ */ static inline const char *cvmx_board_type_to_string(enum cvmx_board_types_enum type) { @@ -404,7 +404,7 @@ static inline const char *cvmx_board_type_to_string(enum } #define ENUM_CHIP_TYPE_CASE(x) \ - case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */ + case x: return (&#x[15]); /* Skip CVMX_CHIP_TYPE */ static inline const char *cvmx_chip_type_to_string(enum cvmx_chip_types_enum type) { -- 2.34.1