Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3579366pxb; Mon, 24 Jan 2022 12:41:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzS7g4+L+m2scr6yQ1TXKs4KHJ0NAq5AokgMeqQJyfHBv+9Wd1R5qs3XKobEYqWK1722GPp X-Received: by 2002:a17:90a:8807:: with SMTP id s7mr75017pjn.223.1643056914712; Mon, 24 Jan 2022 12:41:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056914; cv=none; d=google.com; s=arc-20160816; b=vznZD+3ZjONYAHCbtTw76O+QEGW6yq4et+Miky4l44yZ/KO/4Kbw7cbyB+1CR6RZQs 3bqswAt5yRVasaRt17fzAdKK8uswriunJsImOwjLR5UmYDhaPP8Y6tRFYYrGLhaggqV4 QgvLEZC655kA0CUu9zxTgT9/33qR5aGYcby7chNJ9Hxqc1aAC2B64L5aV5uC54WA5ind XPJ9Hfce5vH5MONaq/Xl4uJ4wZL9v3REyvaxgKMN1GPaL5jdnsMVE7eUcVaDLMssOvG2 FzP+r6y8HmWRA5YAkR9ZVvC9JviK37fT6C3MtXvc7Uq9ryeiZDXyaLaz1QmTLdJeqdV8 pITw== 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=YnsHSFKFscXej6f4ozheEoF73dRc8VCVUMgGb1wTUIheZrfuVCOhBx0Nz+bLZzwsvV ogThFwwe2ouHG0aIEGUm3ID4nP2KaGXqWEBZon5Uu+IjoWfsRRsP+VjtrzDzZLeq0EBd Fek2nHYWKumBKyvoltT+hUXggSn91lwDaM5Lit8QhQO67gCuipUq6+KWjlpgHrjTomvV H33z/p/r3kLeewg4HwCu3X2ve1b77Z6Lk4UzG+AO4+hRr8ycA6TLh3rbXfqI29eMzsb3 z6RG12Pf3Nh+V3mOLURiRiL0kmFsOr+UyfCjnLrLdvRt3wd9uC3pscwCT3uaWXqjhpEF V95g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i+WPU0db; 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 z6si3070070pfe.233.2022.01.24.12.41.37; Mon, 24 Jan 2022 12:41:54 -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=i+WPU0db; 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 S1347549AbiAXT6q (ORCPT + 99 others); Mon, 24 Jan 2022 14:58:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348327AbiAXTmf (ORCPT ); Mon, 24 Jan 2022 14:42:35 -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 B7D47C08EE18; Mon, 24 Jan 2022 11:21:46 -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 75845B8122C; Mon, 24 Jan 2022 19:21:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43AD6C340E5; Mon, 24 Jan 2022 19:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052104; bh=Qf6XnIzeElSZlaTPE0+w9iFReX52uTDmquC2axMPOMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i+WPU0dbfQrbRnhMiu/hj6m6DNwT6T9VWWAFpwFNptCCKk7tzTOHJz6f9PO4DMbVY yuGCqupcO9CJgz5OfOjS7AYPsZk/8Xm8FlW6v2BrPBDzGZKVV9Ca+OvJeVb+vF49HH +ruPDdUHTJ8pVS2zEgQb3uo+snutG197hTSjtUcI= 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.19 191/239] MIPS: Octeon: Fix build errors using clang Date: Mon, 24 Jan 2022 19:43:49 +0100 Message-Id: <20220124183949.188145353@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183943.102762895@linuxfoundation.org> References: <20220124183943.102762895@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