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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 44F7AC43334 for ; Tue, 12 Jul 2022 14:25:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 154431681; Tue, 12 Jul 2022 16:24:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 154431681 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657635934; bh=D8ft9V0+ADG3wDCihX2raadoPFqtJ3Qm3yeYVZqzsmA=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EEWAFVx0xIe0MZz911Urzr9dvejp9/K6u2NkdFXChLBkjzJW5lhjg3xiJRjpLedY8 4BQgH1ws8Yx+icb2t9akZTRJhi5C00EOiG1Z9JgV2r/G6598RNVInb4ZbWNAbc2u/w lhsO/DdJ7KIJWZq1fW7CMX5jMPtf8MYl6CCTLCt4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AAFB4F8023B; Tue, 12 Jul 2022 16:24:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 423F7F8012B; Tue, 12 Jul 2022 16:24:42 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 75053F800BD for ; Tue, 12 Jul 2022 16:24:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75053F800BD X-IronPort-AV: E=McAfee;i="6400,9594,10405"; a="346629483" X-IronPort-AV: E=Sophos;i="5.92,265,1650956400"; d="scan'208";a="346629483" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2022 07:24:30 -0700 X-IronPort-AV: E=Sophos;i="5.92,265,1650956400"; d="scan'208";a="684791027" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2022 07:24:25 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oBGoI-001BWj-1L; Tue, 12 Jul 2022 17:24:22 +0300 Date: Tue, 12 Jul 2022 17:24:22 +0300 From: Andy Shevchenko To: Cezary Rojewski Subject: Re: [PATCH 1/2] lib/string_helpers: Introduce strsplit_u32() Message-ID: References: <6c8e4104-2239-a188-649d-585f059cabdd@intel.com> <2c6a4a61-e6c8-0487-8d29-dc3fbb90bbe2@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c6a4a61-e6c8-0487-8d29-dc3fbb90bbe2@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Cc: Andy Shevchenko , Pierre-Louis Bossart , ALSA Development Mailing List , Kai Vehmanen , Liam Girdwood , Linux Kernel Mailing List , Takashi Iwai , Hans de Goede , Mark Brown , Bard Liao , Ranjani Sridharan , amadeuszx.slawinski@linux.intel.com, =?iso-8859-1?Q?P=E9ter?= Ujfalusi X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, Jul 12, 2022 at 03:51:04PM +0200, Cezary Rojewski wrote: > On 2022-07-09 10:42 PM, Andy Shevchenko wrote: ... > I still believe that casting blindly is not the way to go. I did explicitly > ask about int vs u32, not int vs unsigned int. Please note that these values > are later passed to the IPC handlers, and this changes the context a bit. If > hw expects u32, then u32 it shall be. What you can do is probably utilize _Generic() which will reduce the code base and allow to use the same template for different types. -- With Best Regards, Andy Shevchenko