Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp475807pxb; Wed, 3 Nov 2021 07:19:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuiYp1+EHt8fw++gfHJvRp0mXNwaBC9piZIsYBz6RdPIebRFQvRyRGIWmmb55fEcKxuaSF X-Received: by 2002:a17:906:919:: with SMTP id i25mr53414310ejd.171.1635949195563; Wed, 03 Nov 2021 07:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635949195; cv=none; d=google.com; s=arc-20160816; b=KAiCs7TFnD8FvG+YqpeeAWqFrfJQ6Kx3+h0ADylqjuspEs7I0f1dF9DMb0cWqXr7y7 IPRL47mgcx/oHetXmJPOFmUeUzh6ls8cSAawGOTgbnOp91t7BrQYdyGwSqZ76+BHxo9j ot4l7++O1jz4J+P2SSUibcNsoRdk43I5YwEnLvoQrTC92n770nClLNhaTU+q8xmhF3vP QjK4F0AR4XB5FsoFJYhQA3lKcaFzCiHh7JczgmpBELVgvZxN0/x9sBoAznKiR02nkZZa yewLsd7b/kvEufYJlDdMeAVxL85d7UOh8gmuLnAcwaXRY0mmqYlR5QxDnCQyjxD+ItUn sgSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=TvucD8AAIwtj7VUw6WQlCoEcIxBpS4T2oxXPo96365Y=; b=0Zi2SFDdXfvG8hKmjoLbES5cEaNzzfw/a4UTmqcWoGJNWitsSGpJSu/WbJdBsi9FNO 4UdX3G+8mIPbW0NXnaoV4w+px8lsA2IGLf5zbeTVRH5BwFBWq47pNfhfcozNFiZt6D+J tV+644E47b7UTfN17kRQBkrPNkN+g8iWL7+DZlvURoxHsXdFJVqvzRHrALWleWVSIynd iyOCFXExhEijsV2zVtnwMzO+oIJS9osDDdYHZqJuMe7xzYHE18mo46dskZnLfeyKA7kr x6tTfBqRAYt/hv4J6yeSQeqNk34wj13YP4ZielA4TponYcTrFhSZ42ZJLST1Hm2fbN01 8wow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si3802257edp.551.2021.11.03.07.19.13; Wed, 03 Nov 2021 07:19:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbhKCOSo (ORCPT + 66 others); Wed, 3 Nov 2021 10:18:44 -0400 Received: from mga17.intel.com ([192.55.52.151]:54837 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231131AbhKCOSn (ORCPT ); Wed, 3 Nov 2021 10:18:43 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10156"; a="212253588" X-IronPort-AV: E=Sophos;i="5.87,206,1631602800"; d="scan'208";a="212253588" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2021 07:16:07 -0700 X-IronPort-AV: E=Sophos;i="5.87,206,1631602800"; d="scan'208";a="450079125" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2021 07:16:03 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1miH3L-003HQz-Ib; Wed, 03 Nov 2021 16:15:47 +0200 Date: Wed, 3 Nov 2021 16:15:47 +0200 From: Andy Shevchenko To: Jonas =?iso-8859-1?Q?Dre=DFler?= Cc: Brian Norris , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , Kalle Valo , "David S. Miller" , Jakub Kicinski , Tsuchiya Yuto , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Maximilian Luz , Bjorn Helgaas , Pali =?iso-8859-1?Q?Roh=E1r?= Subject: Re: [PATCH] mwifiex: Add quirk to disable deep sleep with certain hardware revision Message-ID: References: <20211028073729.24408-1-verdre@v0yd.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Nov 03, 2021 at 02:37:53PM +0100, Jonas Dre?ler wrote: > On 11/3/21 13:25, Jonas Dre?ler wrote: ... > > > > +?????????????? if (strncmp(ver_ext->version_str, "ChipRev:20, BB:9b(10.00), RF:40(21)", 128) == 0) { > > > > > > Rather than memorize the 128-size array here, maybe use > > > sizeof(ver_ext->version_str) ? > > > > Sounds like a good idea, yeah. > > Nevermind, the reason I did this was for consistency in the > function, right underneath in the same function it also assumes > a fixed size of 128 characters, so I'd rather use the same > length. > > > memcpy(version_ext->version_str, ver_ext->version_str, > > sizeof(char) * 128); Besides sizeof(char)... > > memcpy(priv->version_str, ver_ext->version_str, 128); > > Might be a good idea to #define it as MWIFIEX_VERSION_STR_LENGTH > in fw.h though... ...I think you simply need a precursor patch that changes this to sizeof() / #define approach. -- With Best Regards, Andy Shevchenko