Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp820534imu; Fri, 16 Nov 2018 10:43:33 -0800 (PST) X-Google-Smtp-Source: AJdET5fsUeQGVMAk4Z33y8DdshnxzxFK4znKgYNVsQtGjadHUPzFYwvcNz/KV9rKAru/JQLU0IRS X-Received: by 2002:a62:c501:: with SMTP id j1-v6mr7209205pfg.205.1542393812975; Fri, 16 Nov 2018 10:43:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542393812; cv=none; d=google.com; s=arc-20160816; b=BxsRr6Z+xkVRTJfbQS0Viajy3eFk3LT+g5kUwzMha+uSVZIEdcFSW+KmKXi97pScDC 3qQfQku33cWfrzYwlk3BN6nKYWOzDLOkBKq8RKl5facfSbCvIgimjp8oenSq0ONS3GH8 XxlUQKQ40cEru50OY6PKArrKmbFbeXI76I3mwvMmrDgmZbl7aSsxHz02myGeFhng0ygC cF/vYMKlJ6QEiIr4wZtOYPP4RTIarvvttOhqlLmujFXaW9tpfKU0DIezh4XgMWrWE3nm PteSmAn9Qo5H18UnSnkXfKrXMA+Wknxyzy31ahmANwyhuR+1PyvN3STe+71BwUZxCNjx efvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=WtbD0qpAlv3PFlgxLGj2wCm1BmEKYO4bz9Dv1CyoZBg=; b=CHiW5s6GCMH0YxKwoVXhHWbUrjp2jjOeY6lmfEFCcOK3n0eUFoTlsuXGP3/PKge4BV 8tw23vmLSBRXBk9nOdGl0My0Kkld9psZo6++b0WYEefMSLDkfmJWe8n83ft4+vCBZ8aX jnGSF5Q40OVsaDL+Z8DPJSnJoyBU4SaaKZrpcoJcG2gZZ5AGNiczzoM/FT0Llmc/wWHi L08/d2YVDbX31I/2wYJCNIn22F0zw0FE3OjFZSHaLSaVPE2OHjrZO4j6S27CT4oA2412 DkMuonkCkFou2RUpqDr/eaU3nItowwXnUsnBVjXKoIf9ck2tDhpipUAjzTcGid6l8jYS VZjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5-v6si28750938pfk.172.2018.11.16.10.43.18; Fri, 16 Nov 2018 10:43:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390292AbeKQEz5 (ORCPT + 99 others); Fri, 16 Nov 2018 23:55:57 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:41696 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729431AbeKQEz5 (ORCPT ); Fri, 16 Nov 2018 23:55:57 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1gNj4R-0005fu-JY; Fri, 16 Nov 2018 18:42:23 +0000 From: Colin King To: Vitor Soares , Boris Brezillon Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][i3c-next] i3c: master: fix mask operation by using the correct operator Date: Fri, 16 Nov 2018 18:42:23 +0000 Message-Id: <20181116184223.28240-1-colin.king@canonical.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The masking operation on status is using a bitwise 'or' rather than a bitwise 'and' operator, and hence the result is always non-zero which is probably not what is intended. Fix this by using the correct operator. Detected by CoverityScan, CID#1475523 ("Wrong operator used") Fixes: 88acc98a712a ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Colin Ian King --- drivers/i3c/master/dw-i3c-master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index 0153e6e9de52..b532e2c9cf5c 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -1085,7 +1085,7 @@ static irqreturn_t dw_i3c_master_irq_handler(int irq, void *dev_id) spin_lock(&master->xferqueue.lock); dw_i3c_master_end_xfer_locked(master, status); - if (status | INTR_TRANSFER_ERR_STAT) + if (status & INTR_TRANSFER_ERR_STAT) writel(INTR_TRANSFER_ERR_STAT, master->regs + INTR_STATUS); spin_unlock(&master->xferqueue.lock); -- 2.19.1