Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp824149ybz; Fri, 24 Apr 2020 09:52:29 -0700 (PDT) X-Google-Smtp-Source: APiQypINpJSG6pfALLToD9ED6BOzvtG7StUuXT/qJrZyEYtTDeK/uzF0uezv+O+BBcI7lovXCUFS X-Received: by 2002:a17:906:b28f:: with SMTP id q15mr7637000ejz.188.1587747149525; Fri, 24 Apr 2020 09:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587747149; cv=none; d=google.com; s=arc-20160816; b=mUaIA8/vtdeM2JLOQqhZUWBr/MHOK5rnk5R2HLSG6nVBYvt9CmFy1F9zDgRNOJ07Dg TCvlH7twwU62wkkgocGQcp7m5WJqDxI2WELSLtWfco8/GVDcx2LmPJtXhRlymh0ark0a smb1gRGJ6CTefBRryLu7hx0N4u0dN8mjicsT2T/62pr9+B4j5WGqAoc84UmqDdsRIWJR OCGuQBrxicKPrQuwO8UFwEhNDFGhKSywmDX/fjLxMHAzH1j7vYeXe4EjFu4ujc7Tyhe7 D/r5bBmgb2nc1aiqMw/TmQNhGIku8CI2iQA9VdPnP5aNpzIpDAjFVLyUvNCYNn7q/AAX YTCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:from:subject:cc:to :dkim-signature; bh=dTgEx1+Rl6VbiWKl5IX0KpeHdkjuU0+SeKoIyVnwCTs=; b=R1t6lm7A4+Ud/YTzNtMWmbfAinwRzP/44wG+fT+WR2mtknSHHfo4KEiEoGLJ19m9xU xA9tN8+UEuOE7Jq2/l8qojj6T8zfiL6mn0APYrE82OVbyZZlFluN6RB8zPAAc2l8wkQ4 pkbjenaqcrpie1VOBJOyRKa4NCldnNMTGjDEmt4vBkjROU7eQYz6/NA0TTqSgDcoJ44c EnRGnXZx3GzqJB354ykBijKdee3S3g+WsyPa4FCVH5hCb12oaNZu1kajpBvlNFRmd5Sh /4dP6lCaS9TPXvWFMF8lA0NsGFqMwkVqQ+Z3iZo/oW+2+UmuJI44ZECbrXVlHYIF+X7y iObQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=JUulv6jf; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si3393317edp.525.2020.04.24.09.52.05; Fri, 24 Apr 2020 09:52:29 -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=@oracle.com header.s=corp-2020-01-29 header.b=JUulv6jf; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728581AbgDXQtw (ORCPT + 99 others); Fri, 24 Apr 2020 12:49:52 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:43734 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726793AbgDXQtw (ORCPT ); Fri, 24 Apr 2020 12:49:52 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03OGmgJB071699; Fri, 24 Apr 2020 16:49:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : references : date : in-reply-to : message-id : mime-version : content-type; s=corp-2020-01-29; bh=dTgEx1+Rl6VbiWKl5IX0KpeHdkjuU0+SeKoIyVnwCTs=; b=JUulv6jfLkd8rIT3I5OsAItx8rhw74N6TQYcGrGC5A7F4g4fLOgp78zjFvxA3/0coW6x SLlervw7cMgy0u1m+4ogOPrp08L2H/4J843BnQp28j+0tQhyahAMw1Mq5ynlBu6QYGcI 6GUtS3Vz14sjyKhK5TzxIFS1gV6ppt9aJrYKI4QaeMYAt9eB3ZGKtIVW5u91zx9M7FfL ZZMykjIT/iRhfbAvaluVYvWjuZx7gcOoYvtp3X4fy/mFM1pfBf3aUmhkqtWrBv5V0vh7 7/uM6md0ZyK/IlnCL/0YUOTPksU27Jb755mo+thWzEhXCq3y263xw9Jx0a8by2Mg6ZEF Ew== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 30jvq525mg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Apr 2020 16:49:45 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03OGki3D095733; Fri, 24 Apr 2020 16:49:44 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 30gbbqm9g2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Apr 2020 16:49:44 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 03OGnh0U003096; Fri, 24 Apr 2020 16:49:44 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 24 Apr 2020 09:49:43 -0700 To: Alex Dewar Cc: Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: aic7xxx: Remove unnecessary NULL checks before kfree From: "Martin K. Petersen" Organization: Oracle Corporation References: <20200403164712.49579-1-alex.dewar@gmx.co.uk> Date: Fri, 24 Apr 2020 12:49:41 -0400 In-Reply-To: <20200403164712.49579-1-alex.dewar@gmx.co.uk> (Alex Dewar's message of "Fri, 3 Apr 2020 17:47:11 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9601 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 suspectscore=0 mlxlogscore=876 adultscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004240131 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9601 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 adultscore=0 mlxlogscore=950 phishscore=0 impostorscore=0 clxscore=1015 bulkscore=0 spamscore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004240131 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alex, > There are a number of places in the aic7xxx driver where a NULL check > is performed before a kfree(). However, kfree() already performs NULL > checks so this is unnecessary. Remove the checks. > > Issue identified with Coccinelle. Applied to 5.8/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering