From patchwork Sun Oct 8 21:56:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christos Gkekas X-Patchwork-Id: 9992025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A7BA760364 for ; Sun, 8 Oct 2017 21:56:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90678285AF for ; Sun, 8 Oct 2017 21:56:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 841BE285BE; Sun, 8 Oct 2017 21:56:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2953D285AF for ; Sun, 8 Oct 2017 21:56:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751241AbdJHV4w (ORCPT ); Sun, 8 Oct 2017 17:56:52 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:52419 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751214AbdJHV4v (ORCPT ); Sun, 8 Oct 2017 17:56:51 -0400 Received: by mail-wm0-f67.google.com with SMTP id k4so18828833wmc.1; Sun, 08 Oct 2017 14:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1VD9drM/UxBK2S9wa9mRSW83//9WFUI/TZYaqdarfSA=; b=CXII90Fd2k9dPd+Dc67RjE+c086IE2uBc6RqMkiS1Dv8H7JpG5dbHWA0lwQmrkzQdO iJ/Cp8SK2laVKAqNQlCn0A3yJ72CIawZBdEjQIOwZ6NPpD7xoAZbgjQr88yNWaonG8/M EY0aifGeANr3S6MlndRRRS847q1oT4KP5PG8NBTrZ/LopDcv9rV3oXEUQDNhhK26l3UW feURf9BoLzOzj2gWi8ejKJEoZ/z3RkOWuahSMAdBVf41tOoU0nMoY8jas24tbVV6qfqc 6VZWi+NNGH9urIpA1+Biwxfc7ncqMcZhfTAUSjNcNlVbUxkPJRlxLluyIl1zg46p8xU3 Qt3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1VD9drM/UxBK2S9wa9mRSW83//9WFUI/TZYaqdarfSA=; b=msuGrgmBYB9rpZkyR0PW8fKr7pa8tdPNbGq4RFBiXhz/M130cuR8F2V003lgklo0Ix eXR5yRoSahsHJV+A443MdKz7dUPR4KLVugE8cNhEYaBY987dKwgukK00n6uXuyMZcP/R 1fusXdgngnHjmgXtQopAh99MFRx2sbfDT89U/F0NqRHhknRKJViURCEoWuAxid8bAKWK PAurVs0sgru9HwLdTh2AYdPlKdCysaPUkiESnVn8d+q1CZQyTIpnYXnHQr1rEDIa37x8 EzD5URkO13WrF0vpuG8IaJF+mJc0P2K7nc3QolxZz4pj5PEqFDkNHBvi/2y+LTU8Zzpi 4nWw== X-Gm-Message-State: AMCzsaW9dV5fYEDUElyBmsQ+SaGZN3lYYESxhuAe/eQJ3HPpWjdvZ3FE Byf1ZYXdk4KlsCtjj67+d0FNBSUtYj4= X-Google-Smtp-Source: AOwi7QB/HUwh795akUUZ/g0dPldoyE0gX5zGnANPFgrLDOfk8vb6D9qicMi3P60MOuvrI2OrMpazOw== X-Received: by 10.28.147.208 with SMTP id v199mr6149506wmd.136.1507499810705; Sun, 08 Oct 2017 14:56:50 -0700 (PDT) Received: from inspiron ([2a02:c7d:5e0c:c300:61ec:ecf7:55fa:ca9a]) by smtp.gmail.com with ESMTPSA id 10sm4014066wrt.59.2017.10.08.14.56.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Oct 2017 14:56:49 -0700 (PDT) From: Christos Gkekas To: Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH] cklight: tps65217_bl: Remove unnecessary default brightness check Date: Sun, 8 Oct 2017 22:56:48 +0100 Message-Id: <1507499808-12896-1-git-send-email-chris.gekas@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Variable val holds the default brightness and is unsigned, therefore checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas Acked-by: Daniel Thompson Acked-by: Jingoo Han --- drivers/video/backlight/tps65217_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c index fd524ad..61ea82d 100644 --- a/drivers/video/backlight/tps65217_bl.c +++ b/drivers/video/backlight/tps65217_bl.c @@ -239,8 +239,7 @@ tps65217_bl_parse_dt(struct platform_device *pdev) } if (!of_property_read_u32(node, "default-brightness", &val)) { - if (val < 0 || - val > 100) { + if (val > 100) { dev_err(&pdev->dev, "invalid 'default-brightness' value in the device tree\n"); err = ERR_PTR(-EINVAL);