From patchwork Wed May 25 07:37:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 626051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rF3yF5dmBz9t4Z for ; Wed, 25 May 2016 17:37:09 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752734AbcEYHhH (ORCPT ); Wed, 25 May 2016 03:37:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:59704 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752353AbcEYHhH (ORCPT ); Wed, 25 May 2016 03:37:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CE474AC88; Wed, 25 May 2016 07:37:03 +0000 (UTC) Date: Wed, 25 May 2016 09:37:02 +0200 From: Jean Delvare To: Linux I2C Cc: Daniel Kurtz , Jarkko Nikula , Mika Westerberg , Wolfram Sang Subject: [PATCH] i2c: i801: Drop needless bit-wise OR Message-ID: <20160525093702.64d7309c@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.30; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The interrupt handling code makes it look like several status values may be merged together before being processed, while this will never happen. Change from bit-wise OR to simple assignment to make it more obvious and avoid misunderstanding. Signed-off-by: Jean Delvare Cc: Daniel Kurtz Cc: Jarkko Nikula Cc: Mika Westerberg Cc: Wolfram Sang Reviewed-by: Mika Westerberg Reviewed-by: Daniel Kurtz Reviewed-by: Benjamin Tissoires --- Daniel, was there any reason for this bit-wise OR, which I may be missing? drivers/i2c/busses/i2c-i801.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-4.5.orig/drivers/i2c/busses/i2c-i801.c 2016-05-24 11:04:33.169026906 +0200 +++ linux-4.5/drivers/i2c/busses/i2c-i801.c 2016-05-24 11:05:40.564642488 +0200 @@ -548,7 +548,7 @@ static irqreturn_t i801_isr(int irq, voi status &= SMBHSTSTS_INTR | STATUS_ERROR_FLAGS; if (status) { outb_p(status, SMBHSTSTS(priv)); - priv->status |= status; + priv->status = status; wake_up(&priv->waitq); }