Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3548731pxb; Mon, 24 Jan 2022 11:59:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJx89txh8tHL9zLJeC/90R/0seWVPvAQFvOAO5zmYzjPS8daW7pYO6SLJ3zAkwHVm4wpuZ7N X-Received: by 2002:a17:902:6841:b0:149:6791:5a4f with SMTP id f1-20020a170902684100b0014967915a4fmr15969570pln.123.1643054357509; Mon, 24 Jan 2022 11:59:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054357; cv=none; d=google.com; s=arc-20160816; b=gFGeZYHddDomTjvVgOLGZTTsCu3838WcHQYKrC3RDokTgMOxJSwi7zyaJbFGus1kdM 7aGWtUNgjVKj145DHGZU9rLCFXVbpWfg0tBvnC0wmSWKVTir+9cYhAcfpIhkpykT1Ih/ e/imSBJZQbX28NwbngZDPqR9FdrPSrxJ9K5cGjomiPAjHxsJUBSrNfXfZAAUBoEWxS+Y BqiMxfilxYodVKA1VPJQD9xnGWjjRitlm/n8O6HmYwEuAzHwBgVcMmfmNKL1ttp3P1xL 1KTv+SDSDoY3jyqfhQ2EEYGuCdNXNv0KY8x9VKQeFRuNLT4yFeXbm62Xh/ImQpSHbkN1 VJzw== 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=yr68Arf9n5rPK22abXDXAGioaxXKx9p1UQbglu4V0Nw=; b=c9NFITfZGIKADC0iwxn0sDVdmIozb1DZ0hRyPcXA0kn0+97lK1wUyI4o7iVeQ7YV1a 6zP7wjQ7+SeZVVsv7ZhJa5kDPphHk7dynXX6+vnQ3tneZ/TlWQ5s9HpVU9FAxIaFmDf8 4RqWmoyGJEPa9W8oDtMRGoZn/Or24aFTg5CNWSwqvX/HuzTFnZ/yP/xqW9EDpcD5DhXg /ZPGvgdTPUJrr66mGOpUWX0nmLo5a35umiycYxQcF/W02ju4PJsXUPw3JDjnaWKrIqDd m7GM9IIGDZz3C5/DREScIOIDMlvYScztYJTYQXx6tcKVUDIAR8/v9ArHBt2sYMHaGkLK tp/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="kw/uhcO5"; 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 f3si13952228pgg.506.2022.01.24.11.59.00; Mon, 24 Jan 2022 11:59:17 -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="kw/uhcO5"; 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 S245515AbiAXS5E (ORCPT + 99 others); Mon, 24 Jan 2022 13:57:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245760AbiAXSxS (ORCPT ); Mon, 24 Jan 2022 13:53:18 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D160C06138E; Mon, 24 Jan 2022 10:52:42 -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 ams.source.kernel.org (Postfix) with ESMTPS id B8C35B8122C; Mon, 24 Jan 2022 18:52:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3170C340EC; Mon, 24 Jan 2022 18:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050360; bh=wuNoMB1LjI/E5Xc0U+R3Df730bHsuveOR5VYnDBx41E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kw/uhcO5Ml03X8AR1hUpxdQFRD6tme1gdZ1j03EvqXtQibnAwQIZzUs2gEehxMn0G 6sRmUpFphPb+K9C0lgBMGTgSbUAFB7aiNUuUCu4qUQqTnhM2rGB/75839gPn7jLCFo ebWA0PzB+nK8sNZs33Hr/gLJT0EHyUShxv5n4MgY= 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 4.4 094/114] MIPS: Octeon: Fix build errors using clang Date: Mon, 24 Jan 2022 19:43:09 +0100 Message-Id: <20220124183930.014172186@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183927.095545464@linuxfoundation.org> References: <20220124183927.095545464@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 d92cf59bdae63..bc414657601c4 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h @@ -303,7 +303,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) { @@ -392,7 +392,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