Received: by 10.223.176.5 with SMTP id f5csp643037wra; Sat, 27 Jan 2018 07:03:58 -0800 (PST) X-Google-Smtp-Source: AH8x2254rsnoyJqjsRN6W8zN3BLoFifwellyikVIfAJGy7IXfwqTn0BGyIyQ7QBoewBt0Ra/zkqJ X-Received: by 2002:a17:902:6f08:: with SMTP id w8-v6mr16914262plk.155.1517065438410; Sat, 27 Jan 2018 07:03:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517065438; cv=none; d=google.com; s=arc-20160816; b=t1QzA1iEKx7IvFkQjBW4oLhT0vXEZd/c5aUF4alo+QBajmfMzZmod6SQ/WNP4JK7S1 qWrm3XfcvsYXvAbd39iU5IyWO53UhtfuFvh7ddAmGvbawRpBNCVcHJnB4jm9sgdzX69T apvI9Q9UTtycb2AKV9iHp2wSP+nEGAy7XVKvDjXWTRGv2GV6gd0hGgCEqQz0k7C5UFCE ESXGJ4aA0MJtWCx/A2foPXVJVZoZ9gNqTl+X7k+CXVfIe0TEFQ5QGzb5V7cz41NZ73Mg p82VkGfailYShInHvCVOtMLR89awICfyIW0mtqWNYDhSwA2uslI2eCsVsH+GlJmL5oOP DBVQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=nDY8aS8HXzmj7S0C86RjcsYfz0BMtaCezu8rq9DyXXs=; b=EeLON9D/cfnPLpt5v7zn3yPou1PACxPEz0xueWfxTa8rzxmWDm/WyodubAq2QlGGlK oNM6sJhZfSUw1U71qAwgmgOGxET/Joyojns9okoROkhIx1VSvyo3fSCfWdUfTK9rJXjU nX7DqmR0H7ErmhqtB9iC0D8cZG0os1ABdd+kTTl9JByYoEGg+QjZONMDR96hMMLU04Hg u8xkTs10tJoPDjFagTgVml/3reXbN+vv831uWZ/TOPALs2hT60daRkjXtlN+e5d2UTH0 iWyxKFTTidzW1zmvgvLvqbxvpCfYWgvJn6qRMxyN6YtceZjOP56riIpli7arO0coWJMm TSTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kapsi.fi header.s=20161220 header.b=E8yhVXb6; 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 a9-v6si351799pln.772.2018.01.27.07.03.43; Sat, 27 Jan 2018 07:03:58 -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=@kapsi.fi header.s=20161220 header.b=E8yhVXb6; 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 S1753041AbeA0PDR (ORCPT + 99 others); Sat, 27 Jan 2018 10:03:17 -0500 Received: from mail.kapsi.fi ([91.232.154.25]:47345 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752996AbeA0PDP (ORCPT ); Sat, 27 Jan 2018 10:03:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=nDY8aS8HXzmj7S0C86RjcsYfz0BMtaCezu8rq9DyXXs=; b=E8yhVXb6UBWgxunIAsodFxM5kFKnkACcRR06BXk2wGQ/AOy10+WYFyG2gDV9YuWw8BumqpI8Wl2gGguq4JYE+GgtiufcmnKcDNUv+vz4kq96wYtGXM82L7wjhk0SPKVdShIJwqjJ+NU5fSBYgPqXQULmak6ZAuWet2mycONns+zbr7kmgHrkF9fDiQz/q8EgqVrb54r2CzftHbk/iTR2d/5vkscYy+Ru5iLAHDk8LB5tiNPDJmX/tiattt0gN+nkXBSU4OhZPPVlWhjjOavYAaIq4Xa1pRauCKE7yJfAuq9g90i5/DZNL3F6bTdKPEEfBuWArcsmuv/KiDPqhOiZjA==; Received: from dsl-hkibng22-54f8db-42.dhcp.inet.fi ([84.248.219.42]) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1efS0f-0001bG-2Y; Sat, 27 Jan 2018 17:03:13 +0200 Subject: Re: [PATCH] firmware: tegra: adjust tested variable To: Julia Lawall , Thierry Reding Cc: kernel-janitors@vger.kernel.org, Jonathan Hunter , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <1517063308-16679-1-git-send-email-Julia.Lawall@lip6.fr> From: Mikko Perttunen Message-ID: <2c6c4a51-93d4-04b6-db53-5ef582db97c8@kapsi.fi> Date: Sat, 27 Jan 2018 17:03:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1517063308-16679-1-git-send-email-Julia.Lawall@lip6.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 84.248.219.42 X-SA-Exim-Mail-From: cyndis@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Mikko Perttunen On 01/27/2018 04:28 PM, Julia Lawall wrote: > Check the variable that was most recently initialized. > > The semantic match that finds this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @@ > expression x, y, f, g, e, m; > statement S1,S2,S3,S4; > @@ > > x = f(...); > if (\(<+...x...+>\&e\)) S1 else S2 > ( > x = g(...); > | > m = g(...,&x,...); > | > y = g(...); > *if (e) > S3 else S4 > ) > // > > Signed-off-by: Julia Lawall > > --- > drivers/firmware/tegra/bpmp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c > index a7f461f..96362b5 100644 > --- a/drivers/firmware/tegra/bpmp.c > +++ b/drivers/firmware/tegra/bpmp.c > @@ -732,7 +732,7 @@ static int tegra_bpmp_probe(struct platform_device *pdev) > } > > bpmp->rx.virt = gen_pool_dma_alloc(bpmp->rx.pool, 4096, &bpmp->rx.phys); > - if (!bpmp->rx.pool) { > + if (!bpmp->rx.virt) { > dev_err(&pdev->dev, "failed to allocate from RX pool\n"); > err = -ENOMEM; > goto free_tx; > > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >