Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3721571pxb; Mon, 24 Jan 2022 16:18:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkahOxvLVpEGwvwX+G8T1VcCnwhzV/n9dkPwsTa5/3VA7AJ4QFPpaZ1dATZkA0V4ETifNS X-Received: by 2002:a05:6a00:1f05:b0:4c7:f269:92b2 with SMTP id be5-20020a056a001f0500b004c7f26992b2mr10948568pfb.61.1643069926348; Mon, 24 Jan 2022 16:18:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643069926; cv=none; d=google.com; s=arc-20160816; b=eZURycruXErC8xipXpoE3e+IjiykMwsdkJpfwCoT3eraIiuS5vN6td/sEvVv4+XP8Y IpznrXNR709S8veKGgYf6VP2aqM6nxPYNEe7NKBegGG5g/TrJwcQ2XPe6J8qIhiR0CuJ SJKrjlBAqQn3G8VEkTH0x6x8gCehIRqmRuPADMwicKV1YwSCJibo7Hzu2mf/6L4AkeCH 2THIFCDzC5Y22xjD0GLzTgVH6znH3/SiIajiK/lysh8APERud0XTuAEkAyVJW/L3i5OE GLclNnx+dHnYK1Lb7qwXnmljqaW8s4Ita9jIXPovsjyP9VIy859p5PVMnyxQ7pDXkNQP yBnQ== 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=dRD7Goe0xA80KcEc2ECkBtlltFuC+nlNP1UnxX1ldRF6Q53FxyszzVrXIaCCv3cihs t5IZjCUQcU/7qmPxp0nXWTaykIT+llppiS8zn3Y4fQw0u5etadUvznT5Xf3KjuA9VqYK MBXdKhJRdO/26Er8fG1h4RVFHaZm7m8qCYP7e2hicuR2M7sKRlYABydq654iGUAaI20k GXXd9Uw9NBa/WtnYS09mWt7PW+lr35D7MNoiUX+nu/JDPlpjDULAnywXACyYlQ2QBf32 zBatYvIHFOD9yqJA3qCvozLfGhA88I0xRq23eqyhdRiDTPJEwm1+7k0WOjjPCf8gUbHW ycww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WocURE3e; 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 l12si13064010pga.479.2022.01.24.16.18.34; Mon, 24 Jan 2022 16:18:46 -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=WocURE3e; 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 S2372989AbiAYAMv (ORCPT + 99 others); Mon, 24 Jan 2022 19:12:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1849668AbiAXX00 (ORCPT ); Mon, 24 Jan 2022 18:26:26 -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 63A8EC06124D; Mon, 24 Jan 2022 11:10:39 -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 1F721B8122C; Mon, 24 Jan 2022 19:10:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5895CC340E5; Mon, 24 Jan 2022 19:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051436; bh=Qf6XnIzeElSZlaTPE0+w9iFReX52uTDmquC2axMPOMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WocURE3eWRNrxnKVYiJxrcBBNk6gO6EAENAlOHgJBynXoaml6IlUYVnlED8rjWJmE B4xzPvrl0SW305yToEqrFUV71+z1XRAfDzuPjcOebdhv4oMif7zS+IlAXMdgiLVpui iDC0wbFhY6gfs3gWWQSQ3Mbra9d1VktNrf9+xTyc= 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.14 144/186] MIPS: Octeon: Fix build errors using clang Date: Mon, 24 Jan 2022 19:43:39 +0100 Message-Id: <20220124183941.739616015@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@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