Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1771239rwd; Wed, 17 May 2023 00:48:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4r1/0dewr68z+VyuhfjHWs2YbwsJYgPsgPZmdbkbXrD2mfohx5dlVbdZ1BkAyOLp0U+SAh X-Received: by 2002:a17:902:bf0b:b0:1ac:3780:3a76 with SMTP id bi11-20020a170902bf0b00b001ac37803a76mr34517505plb.4.1684309682899; Wed, 17 May 2023 00:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684309682; cv=none; d=google.com; s=arc-20160816; b=CuCninq5UtN0EFDZwOA/sqOc6Vpl3D5st9wGXO7lvLuAgOgb4+zsPy8yK5zwO+gbgD E17aLmbSr34hMs3qvIuoTspQ7TD6xzXkBr0WOysrb7IidoiGtMzWrQMwanEHHN0VLIis J9HMgB9n6y2eIEJPih/SR1WjtK7ARyU4MNLzZ/5z4+LncP9t7/XlizuDD5SdrZT+UQ3w UK6cD/Tz83J6GdpszDFAlKLmJHtPld0PNaug691d9jSS5lsVYezUW2FkR/9Y+Z1xJ8E/ eBzxgmjn9bJ2soWM22OieJ2MgJpsdI3CzKBzPxPnk5o4tnz1E2sqwlaDjdYl3p1ygj1r SVHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ojH8JHW7gf454vGeC7W3uE4My3/HWzcV1GC/HN22Wvg=; b=vHwKi1hMjPO3CQlM+3dpn4u3osYunOxpD9a+0vJ5QWYYnA3MS9D8P9kuXvXlb6nGW5 zHw7J+qf0Z1rk33YmSXOCwDZ0PA1JC18P92dDNFXMVFnek9tbewvwresDaCk6UE4yNJt 4pDohXYVgYP0MXQTySlO6WbUGVCrLLAIjwTvibH6cgPl9YXdto5/An1Zb67EmgO8vCyr qEggP6xHHQ3M39EakctxVlWi6ClH2/EapVeqkCyvxFvqHspV9gKxvzXe2OWk40lh+B6U N8utCvPJWlouYO4+uHJvroCsXwdP/s//2VT/eUt6MRXgdQELU85lHtg8n5SHMGBgW0tb Gugw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw10-20020a170903044a00b001a522f321f6si19573088plb.29.2023.05.17.00.47.48; Wed, 17 May 2023 00:48:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbjEQHSz (ORCPT + 99 others); Wed, 17 May 2023 03:18:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbjEQHSw (ORCPT ); Wed, 17 May 2023 03:18:52 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4DDD5109; Wed, 17 May 2023 00:18:51 -0700 (PDT) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 343BD8117; Wed, 17 May 2023 07:18:49 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Cc: Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Grygorii Strashko , Keerthy , Kevin Hilman , Nishanth Menon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dan Carpenter Subject: [PATCH] bus: ti-sysc: Fix dispc quirk masking bool variables Date: Wed, 17 May 2023 10:18:41 +0300 Message-Id: <20230517071841.58444-1-tony@atomide.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix warning drivers/bus/ti-sysc.c:1806 sysc_quirk_dispc() warn: masking a bool. While at it let's add a comment for what were doing to make the code a bit easier to follow. Fixes: 7324a7a0d5e2 ("bus: ti-sysc: Implement display subsystem reset quirk") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-omap/a8ec8a68-9c2c-4076-bf47-09fccce7659f@kili.mountain/ Signed-off-by: Tony Lindgren --- drivers/bus/ti-sysc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -1791,7 +1791,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset, if (!ddata->module_va) return -EIO; - /* DISP_CONTROL */ + /* DISP_CONTROL, shut down lcd and digit on disable if enabled */ val = sysc_read(ddata, dispc_offset + 0x40); lcd_en = val & lcd_en_mask; digit_en = val & digit_en_mask; @@ -1803,7 +1803,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset, else irq_mask |= BIT(2) | BIT(3); /* EVSYNC bits */ } - if (disable & (lcd_en | digit_en)) + if (disable && (lcd_en || digit_en)) sysc_write(ddata, dispc_offset + 0x40, val & ~(lcd_en_mask | digit_en_mask)); -- 2.40.1