Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp42550pja; Fri, 22 Nov 2019 03:12:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzEQZ5c6Ko7M/Tsg0+tUw3f+QS6afxoM0Uq2MvQeAg7xJHAEnwEHEp8FF5BJ0ZBSt8Aat/j X-Received: by 2002:a50:de06:: with SMTP id z6mr358727edk.279.1574421171608; Fri, 22 Nov 2019 03:12:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421171; cv=none; d=google.com; s=arc-20160816; b=C3xjyttsS73+h+4sxzzITDkB/kUsenMJ4JvcaED3knAaisJODqdTWSQ7SQRrWkxiSG dnCagr1kMMeFTpNFG2GhNj9I2qeGQrFxIbBIiQGKSRwWwIrZwiTOuFvHCedokeyNhhMl qJ2ieZXVP135kIqeHonUdF0Iwn19FlYAXwCr44fYppDoDIx+Y0rqSEvcn1MmojEJ0Y8E oAqD8XeurLt6UkoOgjJu0NU7bqLWobPE+KsKmmcGKP0ZfqHWtmUfa0wv4o3jkt6S1RX1 NHRq1abAiCXpzO5ExuGb8bjqFlNbV1XOxaSn3DeP2FydoNWncd3byKzN6ATilGk7zstG wCcQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AS2DzfEijpPoaRdst5JEXjr9Ven5heh6o56zeuMiTOk=; b=MrnBDtHKpQz0pGLcf21Ufj9p2bqDI/zLzz6vHnUr7KSBPw3j3aakUVqgh2tDBApzfa W5XfrjAKr3j8ur9gOQ6D6T5yDMod6IyQZqzxSIacUKvI3WEk9a5NXXu1iFNGrpZFZR3e 8LsGDVdVSSEF7AUSgFL8kMJgmutDmP3xvYbxV1o5Yp6hvBUiML2vJFFxidzZ7EXbNweB KlVG7t40oBHJn+NlJ/OnKUoschUJPHpMgfqu1xu8Zt1uoecMI/P7KAjTg/jmIPNAl+/D 1hDzdkHzOuQ3DJfJiU3VNiImKN7+L9bnueWvMFtWOO6k8/gO706mFhShCtXhGVB0PJeU h61w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EQDkejTb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si4727754edj.96.2019.11.22.03.12.27; Fri, 22 Nov 2019 03:12:51 -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; dkim=pass header.i=@kernel.org header.s=default header.b=EQDkejTb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730417AbfKVLJV (ORCPT + 99 others); Fri, 22 Nov 2019 06:09:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:57518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729992AbfKVLDX (ORCPT ); Fri, 22 Nov 2019 06:03:23 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F28E02073F; Fri, 22 Nov 2019 11:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420602; bh=8xNOoACWH3K2CUyjJCpoBhrHykxp+H3DVrmXt4ZVvNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EQDkejTbjVfTrYTjrfrQE8dhubSeHZsZPr9d+MuOsqgB4EAuMlf4oNi5Mw/Yeu2Br Sl3TL/50vdgw0L/kXdd6MgZQMWBfWNDa2gkvT2SZmB1HvKQICCiqI8twzNPkMxoJgE 4jI5ccILoilLmnCOc1OFcWZVrR6JujOj9MSHPibY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.19 161/220] media: cx18: Dont check for address of video_dev Date: Fri, 22 Nov 2019 11:28:46 +0100 Message-Id: <20191122100924.323286385@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@linuxfoundation.org> User-Agent: quilt/0.66 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: Nathan Chancellor [ Upstream commit eb1ca9a428fdc3f98be4898f6cd8bcb803878619 ] Clang warns that the address of a pointer will always evaluated as true in a boolean context. drivers/media/pci/cx18/cx18-driver.c:1255:23: warning: address of 'cx->streams[i].video_dev' will always evaluate to 'true' [-Wpointer-bool-conversion] if (&cx->streams[i].video_dev) ~~ ~~~~~~~~~~~~~~~^~~~~~~~~ 1 warning generated. Check whether v4l2_dev is null, not the address, so that the statement doesn't fire all the time. This check has been present since 2009, introduced by commit 21a278b85d3c ("V4L/DVB (11619): cx18: Simplify the work handler for outgoing mailbox commands") Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/pci/cx18/cx18-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cx18/cx18-driver.c b/drivers/media/pci/cx18/cx18-driver.c index 0c389a3fb4e5f..e64f9093cd6d3 100644 --- a/drivers/media/pci/cx18/cx18-driver.c +++ b/drivers/media/pci/cx18/cx18-driver.c @@ -1252,7 +1252,7 @@ static void cx18_cancel_out_work_orders(struct cx18 *cx) { int i; for (i = 0; i < CX18_MAX_STREAMS; i++) - if (&cx->streams[i].video_dev) + if (cx->streams[i].video_dev.v4l2_dev) cancel_work_sync(&cx->streams[i].out_work_order); } -- 2.20.1