From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F6FDC02194 for ; Fri, 7 Feb 2025 16:02:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AD7BD409F5; Fri, 7 Feb 2025 16:02:37 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id jyc-pMYtsXBw; Fri, 7 Feb 2025 16:02:37 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D4C9E40C6F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1738944156; bh=SAfShQCSiMpGrNIkbzXuL3EXPLqdZooW7wqPfpnyAmY=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ibtkPaF6aRDHgRtZ0wdVzY4zLi8c7R5N9GE6GD8Qy4OjXAg0Efd7SGvGbn0JEr9Ey nQE5PsvUBsw4Z9eMRZ06/IFsDNOtNb87FkQikC62KkwzzyuqnUh1r5CuSluoX51dls w5+aLFU9winODPtvONlFeqN638raUATCCG6yBlLz7USbztFS0z7O8Gh41YM3YbWOlh uPM8kuIYAjL9GvNLtT+erKVJhelRsINNK0591+oOgW6kC9OQ61aLOlKsT+SZ9X4JcV R3tz02LqR2gwRd7Y4zPR801UCQA/uD8bbpKERGgXFnL6m0DEX6hKop6vLTiyQyJFns mA1ZngffZhRBA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id D4C9E40C6F; Fri, 7 Feb 2025 16:02:36 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 4FBD3CF for ; Thu, 6 Feb 2025 18:57:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 338028485B for ; Thu, 6 Feb 2025 18:57:23 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id xuXS-Rl04v91 for ; Thu, 6 Feb 2025 18:57:22 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=kees@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 7E5C2847F2 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7E5C2847F2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7E5C2847F2 for ; Thu, 6 Feb 2025 18:57:22 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6A98D5C6FC0; Thu, 6 Feb 2025 18:56:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDF58C4CEDD; Thu, 6 Feb 2025 18:57:20 +0000 (UTC) Date: Thu, 6 Feb 2025 10:57:20 -0800 From: Kees Cook To: Simon Horman Cc: Przemek Kitszel , intel-wired-lan@lists.osuosl.org, Tony Nguyen , netdev@vger.kernel.org, Konrad Knitter , Michal Swiatkowski , Qiuxu Zhuo , Linus Torvalds , Nick Desaulniers , Jiri Slaby Message-ID: <202502061056.162506F7@keescook> References: <20250205104252.30464-2-przemyslaw.kitszel@intel.com> <20250205204546.GM554665@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250205204546.GM554665@kernel.org> X-Mailman-Approved-At: Fri, 07 Feb 2025 16:02:35 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738868240; bh=TPePmZCPXcaG0UTSmZ9q5V7OsD2otJ6zxRyMZF5OM+w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZvxDa2jd0aw9H6IdLUba7cozMJTmnwaTZZlm8NR+rtXnMLrswhrC5B/1qGIifTS9W aXS/r1srr1JfeBBsvjY9Wkcc/vtL3qzzmXooJs8+OfpMmaXhIP2RmH/IhlHUbwZhHZ aX4f9AbpDluW45geDsrauPMkJklmflYgNbLapZMX8qLBZA0g2acFVPMczuK3ObVjhW 9a8mgE6Pwc3q1YHifry+olZsk529TBbR+JVyDyY4EOiA8/gPIJk+qK5ANSvvtC0r7F mdTs8QO5LxHVicFpq+5vRGLWRo6JP+53aOElwkSdyIeJ3CxB9FCpbksNg9gA63UPMf d4Xt5uDRA1yQQ== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ZvxDa2jd Subject: Re: [Intel-wired-lan] [PATCH iwl-net] ice: health.c: fix compilation on gcc 7.5 X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, Feb 05, 2025 at 08:45:46PM +0000, Simon Horman wrote: > I ran into a similar problem not so long ago and I'm wondering if > the following, based on a suggestion by Jiri Slaby, resolves your > problem. > > diff --git a/drivers/net/ethernet/intel/ice/devlink/health.c b/drivers/net/ethernet/intel/ice/devlink/health.c > index ea40f7941259..19c3d37aa768 100644 > --- a/drivers/net/ethernet/intel/ice/devlink/health.c > +++ b/drivers/net/ethernet/intel/ice/devlink/health.c > @@ -25,10 +25,10 @@ struct ice_health_status { > * The below lookup requires to be sorted by code. > */ > > -static const char *const ice_common_port_solutions = > +static const char ice_common_port_solutions[] = > "Check your cable connection. Change or replace the module or cable. Manually set speed and duplex."; > -static const char *const ice_port_number_label = "Port Number"; > -static const char *const ice_update_nvm_solution = "Update to the latest NVM image."; > +static const char ice_port_number_label[] = "Port Number"; > +static const char ice_update_nvm_solution[] = "Update to the latest NVM image."; > > static const struct ice_health_status ice_health_status_lookup[] = { > {ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_STRICT, "An unsupported module was detected.", > I'd agree that would be the preferred fix. :) -- Kees Cook From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B4DD1A2C06 for ; Thu, 6 Feb 2025 18:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738868241; cv=none; b=tHRpNc1NRvdqev6vSdUDqnNd/+DUcvb6vQz/FkUFC6eNNXpoxd76YsBqIU7uPRhlhAGfZuMtijJTCGZTgSZRk0twlwaFiQWlhXLdjo1OhYtEHvo+G+FyyEYeoXDe0v8JLdV8LypYMWES5Fptv6yofbWk9m0pyIgQbCJYgtZns+Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738868241; c=relaxed/simple; bh=TPePmZCPXcaG0UTSmZ9q5V7OsD2otJ6zxRyMZF5OM+w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uInk5DXJmjzrYToKTd7edoG7XJ4MS/IiZbO0tCga4twjTr+mMpWsOIDoAlKBlllppt0vh4E7mZtoJaElmirfMKB6Fazl9bDNd4RoLEY1mRe2/S/pDD+tIKHz/Y7ioiiQ/398BpErq3KZ9nB2KNB4dUItaCO0IU42yADctNoFIEU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZvxDa2jd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZvxDa2jd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDF58C4CEDD; Thu, 6 Feb 2025 18:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738868240; bh=TPePmZCPXcaG0UTSmZ9q5V7OsD2otJ6zxRyMZF5OM+w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZvxDa2jd0aw9H6IdLUba7cozMJTmnwaTZZlm8NR+rtXnMLrswhrC5B/1qGIifTS9W aXS/r1srr1JfeBBsvjY9Wkcc/vtL3qzzmXooJs8+OfpMmaXhIP2RmH/IhlHUbwZhHZ aX4f9AbpDluW45geDsrauPMkJklmflYgNbLapZMX8qLBZA0g2acFVPMczuK3ObVjhW 9a8mgE6Pwc3q1YHifry+olZsk529TBbR+JVyDyY4EOiA8/gPIJk+qK5ANSvvtC0r7F mdTs8QO5LxHVicFpq+5vRGLWRo6JP+53aOElwkSdyIeJ3CxB9FCpbksNg9gA63UPMf d4Xt5uDRA1yQQ== Date: Thu, 6 Feb 2025 10:57:20 -0800 From: Kees Cook To: Simon Horman Cc: Przemek Kitszel , intel-wired-lan@lists.osuosl.org, Tony Nguyen , netdev@vger.kernel.org, Konrad Knitter , Michal Swiatkowski , Qiuxu Zhuo , Linus Torvalds , Nick Desaulniers , Jiri Slaby Subject: Re: [PATCH iwl-net] ice: health.c: fix compilation on gcc 7.5 Message-ID: <202502061056.162506F7@keescook> References: <20250205104252.30464-2-przemyslaw.kitszel@intel.com> <20250205204546.GM554665@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250205204546.GM554665@kernel.org> On Wed, Feb 05, 2025 at 08:45:46PM +0000, Simon Horman wrote: > I ran into a similar problem not so long ago and I'm wondering if > the following, based on a suggestion by Jiri Slaby, resolves your > problem. > > diff --git a/drivers/net/ethernet/intel/ice/devlink/health.c b/drivers/net/ethernet/intel/ice/devlink/health.c > index ea40f7941259..19c3d37aa768 100644 > --- a/drivers/net/ethernet/intel/ice/devlink/health.c > +++ b/drivers/net/ethernet/intel/ice/devlink/health.c > @@ -25,10 +25,10 @@ struct ice_health_status { > * The below lookup requires to be sorted by code. > */ > > -static const char *const ice_common_port_solutions = > +static const char ice_common_port_solutions[] = > "Check your cable connection. Change or replace the module or cable. Manually set speed and duplex."; > -static const char *const ice_port_number_label = "Port Number"; > -static const char *const ice_update_nvm_solution = "Update to the latest NVM image."; > +static const char ice_port_number_label[] = "Port Number"; > +static const char ice_update_nvm_solution[] = "Update to the latest NVM image."; > > static const struct ice_health_status ice_health_status_lookup[] = { > {ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_STRICT, "An unsupported module was detected.", > I'd agree that would be the preferred fix. :) -- Kees Cook