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 58389C433F5 for ; Thu, 3 Mar 2022 10:35:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231317AbiCCKfo (ORCPT ); Thu, 3 Mar 2022 05:35:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232413AbiCCKfk (ORCPT ); Thu, 3 Mar 2022 05:35:40 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EAF3340D2; Thu, 3 Mar 2022 02:34:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646303694; x=1677839694; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=U3CkbipzqRbVQQYh0KNk3tlacM3JmBcSMhxa/ULnS34=; b=cdAxkBGfkumrfX2yaZdh0j+J0bSjBzm/GktY0+UKwQaz13zQB2U3hq6z 1FHzsq7ln9bKrnwoJUwT3N7C3gWLaIdG+M7ak43vf5yZjN4TZejNO8b66 +bd7B7YE0JFRi6815LH7ca/tsHGHbtDtuLud3Z0dc6ujHURFr5S3M6cjK 5zpy3EApPCCMbCn7r4xJy+cPClvuSUgPUCecfyT0nOawCb1kLRHIZWxaH AvXFDb5u3mlmEwz/MATEvQUkciRpRzFHjyBwMCA6paG4BNLRsxyBf8zGW dNtclbTaQzpHt/UU6qILe8dtpUXxnKbfj3VrLeU5Ssf86i7yvX+UmCvjC w==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="237150278" X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="237150278" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 02:34:53 -0800 X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="508542490" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 02:34:46 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nPimV-00Ak1G-2F; Thu, 03 Mar 2022 12:33:59 +0200 Date: Thu, 3 Mar 2022 12:33:58 +0200 From: Andy Shevchenko To: Tyrone Ting Cc: avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, venture@google.com, yuenn@google.com, benjaminfair@google.com, robh+dt@kernel.org, krzysztof.kozlowski@canonical.com, yangyicong@hisilicon.com, semen.protsenko@linaro.org, wsa@kernel.org, jie.deng@intel.com, sven@svenpeter.dev, bence98@sch.bme.hu, lukas.bulwahn@gmail.com, arnd@arndb.de, olof@lixom.net, tali.perry@nuvoton.com, Avi.Fishman@nuvoton.com, tomer.maimon@nuvoton.com, KWLIU@nuvoton.com, JJLIU0@nuvoton.com, kfting@nuvoton.com, openbmc@lists.ozlabs.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 08/11] i2c: npcm: Correct register access width Message-ID: References: <20220303083141.8742-1-warp5tw@gmail.com> <20220303083141.8742-9-warp5tw@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220303083141.8742-9-warp5tw@gmail.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 Thu, Mar 03, 2022 at 04:31:38PM +0800, Tyrone Ting wrote: > From: Tyrone Ting > > Use ioread8 instead of ioread32 to access the SMBnCTL3 register since > the register is only 8-bit wide. > Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") No, this is bad commit message, since you have bitwise masks and there is nothing to fix from functional point of view. So, why is this a fix? > Signed-off-by: Tyrone Ting > Signed-off-by: Tali Perry This is wrong SoB chain. ... > - return !!(I2CCTL3_SCL_LVL & ioread32(bus->reg + NPCM_I2CCTL3)); > + return !!(I2CCTL3_SCL_LVL & ioread8(bus->reg + NPCM_I2CCTL3)); ... > - return !!(I2CCTL3_SDA_LVL & ioread32(bus->reg + NPCM_I2CCTL3)); > + return !!(I2CCTL3_SDA_LVL & ioread8(bus->reg + NPCM_I2CCTL3)); -- With Best Regards, Andy Shevchenko 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 83383C433F5 for ; Thu, 3 Mar 2022 10:36:36 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4K8S8L1T0pz3c2b for ; Thu, 3 Mar 2022 21:36:34 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=kcG16CG4; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=andriy.shevchenko@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=kcG16CG4; dkim-atps=neutral Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4K8S7b1jKWz3bx8 for ; Thu, 3 Mar 2022 21:35:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646303756; x=1677839756; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=U3CkbipzqRbVQQYh0KNk3tlacM3JmBcSMhxa/ULnS34=; b=kcG16CG4UNyvMr/XVA3J29Oy/B0OVH52Zjo9ZN16SO+kHN0qr9c+8CY5 xSW5KyWISd2ib2TuM6jhtGwwp8coZhqne9FpPH+GRYm/DVV4M3Yinvz5T ujne25Q4/ZuIF5OLQUsU4HSOJdzFPspFYJ6rcyn4ohIcLrMGrLqbt2ypi 18Nf3A0ffTYPGfU/7E91ylZR3F0CXDsiYh0a32YcvcGpIvVVifo/rCS0M wTyZIuuDQysSpbks39xVsQMZkJ18hpcu4UgZJViPim4LGK90E5SamVjcb aqe9ySB6P/4IbO0LlutPy3OgLzTjH+/2x0UBRxuH2QKE7SHPLWiAjoHfy A==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="252465558" X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="252465558" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 02:34:54 -0800 X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="508542490" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 02:34:46 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nPimV-00Ak1G-2F; Thu, 03 Mar 2022 12:33:59 +0200 Date: Thu, 3 Mar 2022 12:33:58 +0200 From: Andy Shevchenko To: Tyrone Ting Subject: Re: [PATCH v3 08/11] i2c: npcm: Correct register access width Message-ID: References: <20220303083141.8742-1-warp5tw@gmail.com> <20220303083141.8742-9-warp5tw@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220303083141.8742-9-warp5tw@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tmaimon77@gmail.com, devicetree@vger.kernel.org, tali.perry1@gmail.com, linux-i2c@vger.kernel.org, benjaminfair@google.com, krzysztof.kozlowski@canonical.com, openbmc@lists.ozlabs.org, JJLIU0@nuvoton.com, lukas.bulwahn@gmail.com, tomer.maimon@nuvoton.com, KWLIU@nuvoton.com, bence98@sch.bme.hu, arnd@arndb.de, sven@svenpeter.dev, robh+dt@kernel.org, Avi.Fishman@nuvoton.com, yangyicong@hisilicon.com, semen.protsenko@linaro.org, jie.deng@intel.com, avifishman70@gmail.com, venture@google.com, linux-kernel@vger.kernel.org, wsa@kernel.org, kfting@nuvoton.com, tali.perry@nuvoton.com, olof@lixom.net Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Thu, Mar 03, 2022 at 04:31:38PM +0800, Tyrone Ting wrote: > From: Tyrone Ting > > Use ioread8 instead of ioread32 to access the SMBnCTL3 register since > the register is only 8-bit wide. > Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") No, this is bad commit message, since you have bitwise masks and there is nothing to fix from functional point of view. So, why is this a fix? > Signed-off-by: Tyrone Ting > Signed-off-by: Tali Perry This is wrong SoB chain. ... > - return !!(I2CCTL3_SCL_LVL & ioread32(bus->reg + NPCM_I2CCTL3)); > + return !!(I2CCTL3_SCL_LVL & ioread8(bus->reg + NPCM_I2CCTL3)); ... > - return !!(I2CCTL3_SDA_LVL & ioread32(bus->reg + NPCM_I2CCTL3)); > + return !!(I2CCTL3_SDA_LVL & ioread8(bus->reg + NPCM_I2CCTL3)); -- With Best Regards, Andy Shevchenko