Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3630659pxb; Mon, 24 Jan 2022 13:58:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUdxJd15358lxZgzak3EWZ7Cvyu9j+UxunDmPQ7/IwR27q5GODQ/WH7tQ3GHGlWjUbZW64 X-Received: by 2002:a17:902:e5cf:b0:14b:8a7:b26d with SMTP id u15-20020a170902e5cf00b0014b08a7b26dmr15671057plf.80.1643061482043; Mon, 24 Jan 2022 13:58:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061482; cv=none; d=google.com; s=arc-20160816; b=j56VVWE+IS3ri8Uc7AAWWqqoM+dGWmRqsxPYQCLAAdFYsVZDIzqC9tSjcERFh9ovAl btLaXIhUXbUAmbcAIGCNhEI6iNtv3frKRzh17WkiWX+v+mkEuhSQQbSZ7QNOAxDSQZWm xqoYJ6p1tMJqfRYmHAEbX5XJIKyuSuozPOivZKP5MULKLND8APiQopGIoD1GSeL3krrK OG38tGjvSv3xhgKAFaoga8ewzwLVVWObctv1yk4uoeb9FbjUGOUQGxjMGBaFHCO1vjDm T9NbKs9aYQzTdUnl5LLvnqeKSqzrqrzwRAjFkCyWb6ITCCXeVpmz/pkxihQ52fHn1bUi R36g== 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=gfGz4oDxuS1PhUXfy+xS/XyRDpiWbE3uHX5izcQNN90=; b=JK20Gtc92h4GC6XSjzvcDxRi9Miws3IjNIhran8xS3XOSqXtN2naC6W3U2CIoQ/nVQ WyWAa6I+vJ+kIEp+c2O32mphok/LDf9usUJpuY2loK8EQcRKBxkLNKwzrNkux2EQ8VZc +nbMN2Mtk9PLjg4uEqiCZfyKKOxERpSgSFduoOSW3FJOWd0RF0wRGQImhoOjRILMouFD vVLZhjWFzezu6elVuPutvbqIe1FsMg7u4Md4yXSDwnEiOffo5ldO3AK7UkdXJjRo7Ly3 jFZLOSL2I+UYmm2IdGL+2sCbmQfH+ZVTbbtbmj2bZZ/b6u5mqJyXsI0TDQGcFCZL1UCf iqew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jddJedW3; 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 l10si401606pjf.126.2022.01.24.13.57.47; Mon, 24 Jan 2022 13:58:02 -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=jddJedW3; 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 S1457045AbiAXVkr (ORCPT + 99 others); Mon, 24 Jan 2022 16:40:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1445273AbiAXVCi (ORCPT ); Mon, 24 Jan 2022 16:02:38 -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 15E5EC06B580; Mon, 24 Jan 2022 12:02:58 -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 A9C3D60916; Mon, 24 Jan 2022 20:02:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F94BC340E5; Mon, 24 Jan 2022 20:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643054577; bh=HTUHJVVdTyLs2HI+l2PKLckftklMLQZY10KtFgY2Q+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jddJedW3P03s2L2udHVHEoe1nagbxGWeDhh8wSPg2AAmHMmztmKdLg941j6raiA3Z FrEzLHwKa04hLFP1UF1/VhfyCJxJnWXfxHt3V/+LEAxPrjomx1ZD5ggIeHoY9It3Oq fgtSdtgwGb/RD1qWOaQVymOp6rlqfFTNTxP/tzlE= 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.10 435/563] MIPS: Octeon: Fix build errors using clang Date: Mon, 24 Jan 2022 19:43:20 +0100 Message-Id: <20220124184039.489830457@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184024.407936072@linuxfoundation.org> References: <20220124184024.407936072@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 c114a7ba0badd..e77e8b7c00838 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h @@ -317,7 +317,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) { @@ -408,7 +408,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