Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp589688ybm; Wed, 27 May 2020 03:09:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdgGouz/xltOu1LUoDADDwgSZ7ur7VUJIumHgSa0P9TPdv5oVhK2yKdUyIjhpplBSWsD2/ X-Received: by 2002:a17:906:278e:: with SMTP id j14mr5136001ejc.270.1590574180080; Wed, 27 May 2020 03:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590574180; cv=none; d=google.com; s=arc-20160816; b=eSL5QM1lWyVjhkwO+7VlXc8ECNN5nWSp/C9XQ7bqhP5UoFpNVNLaSD7FuOKb8t63Ys BSZpy/tJeRcb+dg026/kT0846BZKZmqgA4MbIDAOqFYgws0lLvWAa3G4BvG8Giot5tPn 6Us6Un8d4vv4+B1DeZXhzib1JjIOPYcsx/3J+twsVqMZN5OEoE+aPjZuoPqMWQs5DLfg +5gwoVMHnn0m+R7KJ0/ita1QjdwY8wTDBbl05wRfUCXJkx/LGMqORzJhWc1yMMyJYGc6 q7foMStP/pAgsvUsx4ZtjPkc0+dN7FL0OE38FgQkCGuzDhny0aGAwY+BrAfTtHKBuhhJ oNcA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YnWT8s8ink/KeJFRPdHxxy0KnE9QXS2EIJkcc7O9gtk=; b=g6KTZcFF/cY6KlI4/G+9N0iDfBQtHn4ICOcJHCtJZpHIYU2LpTNiuSW8WzqyX0J0kr pxCceOMxwpuJLfUTrIB5I1sqtANNP3E25fwqO8pcQ5qVniUOaxRIvUegcr77kFbhnhD0 O54EfSw4V46JKNu/p6geN8A/IPj6fmi2v6UHZ10Kz/MdyEGFhFsHxxVSmrlZktm7VlH3 sCYxwOiWwqGSgHJh0ruwxt8IVW98jcBWH1MiBmdDNpdhAAjyqGho9WiRaTOt2MZrWcSW E9LkzNchKoZk23iu6D/6D6S8BHOVN9rUlPrqhXzTvjsneizbe10yLLL3zQVGVlxmMywu ctOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DM3vqxu8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si1338342edf.183.2020.05.27.03.09.17; Wed, 27 May 2020 03:09:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DM3vqxu8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729162AbgE0HMW (ORCPT + 99 others); Wed, 27 May 2020 03:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729144AbgE0HMU (ORCPT ); Wed, 27 May 2020 03:12:20 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA3BBC061A0F; Wed, 27 May 2020 00:12:19 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id ci23so1115115pjb.5; Wed, 27 May 2020 00:12:19 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=YnWT8s8ink/KeJFRPdHxxy0KnE9QXS2EIJkcc7O9gtk=; b=DM3vqxu8dRtwoGww+IORQKfTTdW1nnuAvY8aRKzh62Cx8kqBbcP5lV1qm8URdE5NwI c2s+2BV+jhzfiL+hWF6uvl3M3rc4SZRksRliKnmNBhwzO3LalGMUVe/pJ2seJegirKxY 3aOolQxZqc5UnpX0y292F3vEt7C88vjlI+mWd1ad8e7/AVNK0GAZHXd/EGkAQqw/UBTH 4FdXsSMJJ6gziYNmWfGWpUTvBl7utKor+c7qe3gR/aiDXEO/tQmdBPMArs0FI5akiEKH M//WCYPyz0r/qDeJbXVWbWEsEqaiuJB+R7TwqXi3Sib+9NJec9jV4Mz0yT4Sowh2E8du Rn4Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=YnWT8s8ink/KeJFRPdHxxy0KnE9QXS2EIJkcc7O9gtk=; b=nxRNR9vv8F9+dHzen2skCCMM9jktoOhr+OCtbxX8mdtEzAEDXNxUMziKuz2JESqRSa YnDWMOT5qrK6lwL6RNgy8pRYul+CB/TKrXa163p0XLFE6/BswNG09JtyZTMgBLF+CFLB nrFJ4IUoemtVnK0d3NoIiu/bcRa/ptJqyTHeXPNv3DyvMB8pZjw1lfuGRcViDQ+vgbha Xarzfc3fNr6gg9oIT1S9H+5Ss0Kx9bUSlCdHFPAbrzuuQafArNrXFaWSugLaP++HyCiU OaG6w3LqgUNJuaogL8TFVepJ4DaOMRGjRSpwoyptRlab5HhLfiE3XH1HGkaTLJENnHW/ HGoQ== X-Gm-Message-State: AOAM532YUOiFuaDl/fPqd2PK5S98ORGh8B+toxQ8sKzuw09AlYhGtJ2U 1qe6fpTwpFEVcUsGmf5Gh73FpRQ+ywE= X-Received: by 2002:a17:902:fe81:: with SMTP id x1mr4672432plm.239.1590563539414; Wed, 27 May 2020 00:12:19 -0700 (PDT) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id 10sm1306431pfx.138.2020.05.27.00.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 00:12:18 -0700 (PDT) From: Nathan Chancellor To: Mauro Carvalho Chehab Cc: Sakari Ailus , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 5/7] media: atomisp: Remove unnecessary NULL check in atomisp_param Date: Wed, 27 May 2020 00:11:48 -0700 Message-Id: <20200527071150.3381228-6-natechancellor@gmail.com> X-Mailer: git-send-email 2.27.0.rc0 In-Reply-To: <20200527071150.3381228-1-natechancellor@gmail.com> References: <20200527071150.3381228-1-natechancellor@gmail.com> MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns: drivers/staging/media/atomisp/pci/atomisp_cmd.c:4278:17: warning: address of 'config->info' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!&config->info) { ~ ~~~~~~~~^~~~ config cannot be NULL because it comes from an ioctl, which ensures that the user is not giving us an invalid pointer through copy_from_user. If config is not NULL, info cannot be NULL. Remove this check. Link: https://github.com/ClangBuiltLinux/linux/issues/1036 Signed-off-by: Nathan Chancellor --- drivers/staging/media/atomisp/pci/atomisp_cmd.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 5be690f876c1..105c5aeb83ac 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -4264,7 +4264,6 @@ int atomisp_set_parameters(struct video_device *vdev, int atomisp_param(struct atomisp_sub_device *asd, int flag, struct atomisp_parm *config) { - struct atomisp_device *isp = asd->isp; struct ia_css_pipe_config *vp_cfg = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]. pipe_configs[IA_CSS_PIPE_ID_VIDEO]; @@ -4275,10 +4274,6 @@ int atomisp_param(struct atomisp_sub_device *asd, int flag, atomisp_css_get_dvs_grid_info( &asd->params.curr_grid_info); - if (!&config->info) { - dev_err(isp->dev, "ERROR: NULL pointer in grid_info\n"); - return -EINVAL; - } atomisp_curr_user_grid_info(asd, &config->info); /* We always return the resolution and stride even if there is -- 2.27.0.rc0