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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FB03C433EF for ; Tue, 12 Jul 2022 14:24:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233509AbiGLOYf (ORCPT ); Tue, 12 Jul 2022 10:24:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233498AbiGLOYa (ORCPT ); Tue, 12 Jul 2022 10:24:30 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 893D79C257 for ; Tue, 12 Jul 2022 07:24:29 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6400,9594,10405"; a="348921820" X-IronPort-AV: E=Sophos;i="5.92,265,1650956400"; d="scan'208";a="348921820" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2022 07:24:29 -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 Cc: =?iso-8859-1?Q?P=E9ter?= Ujfalusi , Andy Shevchenko , Mark Brown , ALSA Development Mailing List , Takashi Iwai , Jaroslav Kysela , amadeuszx.slawinski@linux.intel.com, Pierre-Louis Bossart , Hans de Goede , Ranjani Sridharan , Linux Kernel Mailing List , Liam Girdwood , Kai Vehmanen , Bard Liao 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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