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 5E390EE14D3 for ; Wed, 6 Sep 2023 20:46:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244528AbjIFUqh (ORCPT ); Wed, 6 Sep 2023 16:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243182AbjIFUqg (ORCPT ); Wed, 6 Sep 2023 16:46:36 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4542E9; Wed, 6 Sep 2023 13:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694033192; x=1725569192; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=d5zvRhW8pHPVPvumASeRUDz78JQVHT52yAzi/mOU2s4=; b=Ogl0BcPuJKoqShZC1nqR6pkjqcKH10beBqNKNJRHKnY1YM/rQGp613TA iENB9ggApLbcW8hGQMpPiraELMQiyhMdxUEEFEE/1eC0O1+p3EmO1jdT7 YNWAYPLADoeVedLlvUiz0w7nXMo/9P1to4naSjzFvZq+EXvhaB2Zrhlom BLiSKnx5HpjDJH+feqVSvk/G/oiAHu6yvTHwSGf0lqT+sIgoPAufHnC90 RoiRkhdySuVyfazr5Sg3GdEF3SEP0A3ftiaK7g+0WhJyhXOaHvWl/1ryY LS7iygEgKBJbnZl2WPNakJdPi3+Uz3P5Tdjnl7w1nu8FtmAjX4wFKrQrC Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="377093188" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="377093188" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 13:46:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="776772647" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="776772647" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 13:46:29 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qdzPv-0079X0-0D; Wed, 06 Sep 2023 23:46:27 +0300 Date: Wed, 6 Sep 2023 23:46:26 +0300 From: Andy Shevchenko To: Stephen Boyd Cc: Mika Westerberg , Hans de Goede , Mark Gross , linux-kernel@vger.kernel.org, patches@lists.linux.dev, platform-driver-x86@vger.kernel.org, Kuppuswamy Sathyanarayanan , Prashant Malani Subject: Re: [PATCH v2 3/3] platform/x86: intel_scu_ipc: Fail IPC send if still busy Message-ID: References: <20230906180944.2197111-1-swboyd@chromium.org> <20230906180944.2197111-4-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 06, 2023 at 03:22:43PM -0500, Stephen Boyd wrote: > Quoting Andy Shevchenko (2023-09-06 13:13:27) > > On Wed, Sep 06, 2023 at 11:09:43AM -0700, Stephen Boyd wrote: ... > > > @@ -450,6 +468,12 @@ int intel_scu_ipc_dev_simple_command(struct intel_scu_ipc_dev *scu, int cmd, > > > return -ENODEV; > > > } > > > > > scu = ipcdev; > > > > Side observation: Isn't this a bug? We should not override the supplied parameter. > > If it is a bug that would be great to know. I wanted to make an API that > got the scu if it wasn't busy but then I ran across this code that > replaced the scu with ipcdev. To me this seems like a bug, because in other similar code we don't do that. And even reading this one, why do we have a parameter if it's always being rewritten? -- With Best Regards, Andy Shevchenko