Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3366070pxb; Mon, 17 Jan 2022 18:43:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYFDCaVILPndslhmRUxvdl5FRrM0E+Won05GBcsr2CRMRAxtNhH6sCw97tsZL5Dsuu+h7n X-Received: by 2002:a17:902:aa43:b0:14a:ca21:979a with SMTP id c3-20020a170902aa4300b0014aca21979amr3961390plr.18.1642473824070; Mon, 17 Jan 2022 18:43:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642473824; cv=none; d=google.com; s=arc-20160816; b=yyaOZmdvUcprWjZPousHzSqmIjouz4v6UIjfCOC53yNgoMolRFG1MK+V9asqpQOyP4 D2mhxCq7E9wlgSeetIeEtESG69u/TZfnGOkyl3RDUt/n2KYuAX5cCyEVpiDB4dAy0uYV 0Vz62OIMiQPrDdcKLioiCx2xO0nVU+Mm9ESKq2al8ZMGCloq2e8J+RRyCDedoD3wenUo RfCQeg8y7v5oLFe+3VPnJJzdyQ5tkKfZ4+M/j8XzXDiXrDDFtdvV/17A4p3RiCHU1GKQ Py7Xh2M0qzft9eL2QenAYSxHhUtiGMacV1HENQDpbvAOeKyJ7m0RLgbl83knn0++LKVq smdA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8S4bKc3IFdcPhdUVace7UO/Fi9e16ZFdoLJeZNxEE6M=; b=DGq5yodmkksbJm30cb2BMrREcFykXAZVo6rEdL1/NPqXUmjMUMILMeWHNNTEoHS21E Jc5ysKrO/7YzftgGPxhOBjh3Qn0kM/hdwUZZIw9OnNsTeBPz9jhFsWNYKcuZT+xvGXgW KZiGYU5IdwuMaf13JpbCKWOGaEGynMCOp/d04d4i0z3yGEG7G4tMGRAh5WMzTz7nQtO/ zz2+kQs22ZwlBdNyx1pbB8PcNdy4S7ewPjm9KpqKHPzYGhJuD4Le4KweDaRriVmWLaOc U+3e88MmW4tTw9Q02q7V/RXd3aEXryy3l5RZFWHBfaj4tFYl8ZAm+lEwFryct2ZibRH5 lnDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RN5ffPwL; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si14472841pll.538.2022.01.17.18.43.31; Mon, 17 Jan 2022 18:43:44 -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=@kernel.org header.s=k20201202 header.b=RN5ffPwL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241757AbiAQRBo (ORCPT + 99 others); Mon, 17 Jan 2022 12:01:44 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:50370 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241535AbiAQRAn (ORCPT ); Mon, 17 Jan 2022 12:00:43 -0500 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 42DCF611D6; Mon, 17 Jan 2022 17:00:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D25CC36AE3; Mon, 17 Jan 2022 17:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642438842; bh=7Tyt6TC2ggJRw3fF++QSOCLW9HU6iOd4lCmrV9XE4Cw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RN5ffPwL9G0Hi0PUnhkOFJ8uVk01amZr/thnRaVAhP9DwvOZ8XthvjkFJN8rX5cKX J6bmp56aYhIMcAgnvN94HMbyrey5mQdhyOTKZFE0LLR/19RMC+QYr9K58wnab3NUgl N803UI6h9XxnAKPuqevmd2D5J5grcuF2VnFC98sNLLtgXLGfhXlePN/CWs6Jw7rf35 1JWU3duAjVuMnHnUlLfqJedRdhCqfqYH2P0TlcMW/7HMjC+cN1Kty6MwRF/JTI4UxY wu9X3EutrbI70WoMeYbCLDuUvA93XeoUuj8IFb2vG3K0K3HQ+3IzMznzYW6+qQdZpV ORjhoMhVEPZlQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tianjia Zhang , Nathan Chancellor , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Bogendoerfer , Sasha Levin , ndesaulniers@google.com, freifunk@adrianschmutzler.de, linux-mips@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH AUTOSEL 5.16 40/52] MIPS: Octeon: Fix build errors using clang Date: Mon, 17 Jan 2022 11:58:41 -0500 Message-Id: <20220117165853.1470420-40-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220117165853.1470420-1-sashal@kernel.org> References: <20220117165853.1470420-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore 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 0e6bf220db618..6c61e0a639249 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h @@ -318,7 +318,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) { @@ -410,7 +410,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