Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3724505pxb; Mon, 24 Jan 2022 16:23:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxV7xgSB9YwbRMssaHZEYVWhxdzHU/ve+nHkbVjrFU48Hulxr164EBpNL+FKc4kRj79upty X-Received: by 2002:a17:902:d2c2:b0:14b:6611:4c63 with SMTP id n2-20020a170902d2c200b0014b66114c63mr3356568plc.57.1643070211008; Mon, 24 Jan 2022 16:23:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643070211; cv=none; d=google.com; s=arc-20160816; b=R98/yTx5X5V+gGvHhzo3tCeQXO3VgygUGxbOR3zkDrzLjTI068wQxu7Adu/R9yi5Gg fgZPhwj23QuWLTsHmtUr4CSYMDnZrFO/DsDEmaiJJH35mV5RLpQahqbTwQxls6PtYbBk WtSKql6Pa6szP/Tb7AodcOrmWobkrEoFZrCjKXMVa1SZoWDJgZ0oT7t5uQEyx+64tEJX qDMkxZTv+I/JYfnyinP7iAq336/4iYtJW4L0G/621NFgFIzDU7QIvyPmfFBiTIe2p58p XMpr4xvil6q2qa9KwJe/uuD0s1UZamQLloP/aOTwyHJaNRk3ae+f4U/SBQBu2pLq1DaF zU9g== 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=8S4bKc3IFdcPhdUVace7UO/Fi9e16ZFdoLJeZNxEE6M=; b=txvycwD+7yT8eShq0fZMHrQpFKc4gRWOVoRgIqO01QntIjYu2HuPFTRs6tQZ5AN4wq NZcslTnfq8Gzfd+jSpJFqBj8D4NlVI+jcnmJ3HJDJOHcHQdmJbM+N3cKBCPdYJltBpwY eqyFHuw6yF2uR+3zqzbv/ax5n8PcYIT7zpP9i9XJDx3uD87s8RaKkmSlnLgSSjhOPzuu 0+yG/oaZFEpQ7BiWXLt2woDWuZGBb47rb+EHA/GKptCbt3P9Ef4QqGo2nOPqI9iHrqLy n+u+IVEJ8lJMMDelDwD4jZrIKmA+NgaZWGIvjDQrJrYcZcEzykBdbEvXrOMeJQZydA7w CeCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vk2CcGYc; 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 a70si11345828pge.522.2022.01.24.16.23.18; Mon, 24 Jan 2022 16:23:30 -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=Vk2CcGYc; 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 S2374633AbiAYARe (ORCPT + 99 others); Mon, 24 Jan 2022 19:17:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383848AbiAXX2E (ORCPT ); Mon, 24 Jan 2022 18:28:04 -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 41203C01D7F6; Mon, 24 Jan 2022 13:31:33 -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 D6A2A614F1; Mon, 24 Jan 2022 21:31:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEA9CC340E4; Mon, 24 Jan 2022 21:31:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059892; bh=7Tyt6TC2ggJRw3fF++QSOCLW9HU6iOd4lCmrV9XE4Cw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vk2CcGYcohBge1czCKo2k+pV+/VRpgb7GuUDwwsRKNKZTLDy9Aa9T74PMkqcO/AkE s9jT/MIbMbaGwNvBzOpyot8sa+daSIpaTck9Pqm6BsqankTZD9TwUW/fUXN+5wDF9X It8mGaeEECdpwOCsAeo+Gdyh1X+yrW1GNrjv6l9M= 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.16 0770/1039] MIPS: Octeon: Fix build errors using clang Date: Mon, 24 Jan 2022 19:42:39 +0100 Message-Id: <20220124184151.193154018@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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 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