Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3891442rdg; Wed, 18 Oct 2023 08:50:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkUQdsi/blINqM+7h7AcIFJvEzp9PVmLkyLlkK0mb1uEz72nqOaabJ3q6b974SD10h5+MQ X-Received: by 2002:a05:6359:630d:b0:166:e391:cd0c with SMTP id sf13-20020a056359630d00b00166e391cd0cmr3866273rwb.6.1697644255403; Wed, 18 Oct 2023 08:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697644255; cv=none; d=google.com; s=arc-20160816; b=ny4/LMmsiZXFjTVOa4h963L+ioeTjEg9IVRo6BX21yLzJxIdaf4lqIWgwyZe+aLdUq 66gflh5xGERsbzyq5asxd3pHV6tv7TkqLOd+EcRGMWpAOx+kr9/YBcp7kZk7gaJnmJ0L osejVTYh5rvpz2UF6NhFGadk1QdN01OQYUC9IPYdex2UxfCtuKiZU0XFUbMDR2d4egF0 +Yba2qTe+r52zw7tEMi2F+InFFOVTqK8UJLwCRNGJUkvmUhO7XPr+d2zkgU/pCr2zd9j kfAa+UqDBsGz+3kRzIitckgMkHvitlETnSk633BRNzfv+hqrf4Rsl8dSN7h7x9ViXjPk SckQ== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=USqChNBztnNplmphrs0YmoLZFFQjMZvzxJaNVwJlnbE=; fh=++WoLvYZ32bBUjUTlxYNtJqDx1I0WdIqT8RUcO5yzkY=; b=nuruD9Sy5HM0PTdAs89hZw9mFgWhKYXzNNJkDyJR1/QoPL8S97BjrdwrrVaLy2m1Kx s3v7LYNu6kJJ6y/x3v+0m2RfkE0SLd619dj0XxnHXlpX9alY+hl4fPaKejR19EXVpcnG wrZXGVyps37yLOkULJtA9oqZORiSs4itU3ivQI4QN8XkxzEwY6bi0pQRODzSEmVVtgfq gGRYe3xRbBG7IJWsWcxaFg8NwHB3peCFzznVKHndzPzr37quwbx9WfecH/6Q3DbyoGAP 39EXRfADMyIIGg+uXQEeJZT49Pt02U3Fsbouia3FOGiPXRdggBlcaj82YOlhcbxPKxkL kC7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Wys1n9ww; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id j11-20020a056a00234b00b0068fb6fc3ff1si4340993pfj.209.2023.10.18.08.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:50:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Wys1n9ww; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 3943280E0B65; Wed, 18 Oct 2023 08:50:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232081AbjJRPue (ORCPT + 99 others); Wed, 18 Oct 2023 11:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231235AbjJRPub (ORCPT ); Wed, 18 Oct 2023 11:50:31 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5A6B11B; Wed, 18 Oct 2023 08:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697644229; x=1729180229; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=iUWqA3urvNBr4npcinV5L9hti7YX3A4rFGtlJxXUm4M=; b=Wys1n9wwf59F9qVkTdoxBF7TTmRMbtI1HOhdzxOK1LnDXXaQ4emagq8J bGwO4bv01zUFXwmuSwvqoHRIjUJwXtoYHusTrfsVW4LXde+UAt7TTWM/S SxyhZLWDOAwz41UkEEuXt2Z7lPuG1Ho7ZC1Tr6UGKl9b7BX787buW3NkE GJjdXZrCMvbxhOCGCJO/MbrQomGkUwFI0tzAlwZweM4TMJCpb77bJs+CY XbyL4ZGPGOpbOEdd9jlB+4s3M/ra9vueNrdIPHHgjWaoJuzugz24SMZVN vd1eh3spIM+NIuiEN7DrujKt6aFJQXlIFbc9rEtLbmuhOoC+h1vj6sL8b g==; X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="376416077" X-IronPort-AV: E=Sophos;i="6.03,235,1694761200"; d="scan'208";a="376416077" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 08:50:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="930246859" X-IronPort-AV: E=Sophos;i="6.03,235,1694761200"; d="scan'208";a="930246859" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 08:50:25 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC2) (envelope-from ) id 1qt8oQ-00000006cwJ-3Zqz; Wed, 18 Oct 2023 18:50:22 +0300 Date: Wed, 18 Oct 2023 18:50:22 +0300 From: Andy Shevchenko To: Andreas Klinger Cc: Jonathan Cameron , Lars-Peter Clausen , Angel Iglesias , Linus Walleij , Sergei Korolev , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: bmp280: fix eoc interrupt usage Message-ID: References: <20231018152816.56589-1-ak@it-klinger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231018152816.56589-1-ak@it-klinger.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 18 Oct 2023 08:50:53 -0700 (PDT) On Wed, Oct 18, 2023 at 05:28:16PM +0200, Andreas Klinger wrote: > Only the bmp085 can have an End-Of-Conversion (EOC) interrupt. But the > bmp085 and bmp180 share the same chip id. Therefore it's necessary to > distinguish the case in which the interrupt is set. > > Fix the if statement so that only when the interrupt is set and the chip > id is recognized the interrupt is requested. > > This bug exists since the support of EOC interrupt was introduced. > Fixes: aae953949651 ("iio: pressure: bmp280: add support for BMP085 EOC interrupt") > > Also add a link to bmp085 datasheet for reference. ... > - if (irq > 0 || (chip_id == BMP180_CHIP_ID)) { > + if (irq > 0 && (chip_id == BMP180_CHIP_ID)) { While at it, perhaps drop extra space? -- With Best Regards, Andy Shevchenko