From nobody Fri May 20 00:20:58 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D7B61B4069C; Fri, 20 May 2022 00:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L46p25GgBz3l6H; Fri, 20 May 2022 00:20:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653006058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MyWtwfgWVOEGMx5gNlYMJMWUM6j+GBycuPEFgrt9zhA=; b=u+O0fCSbuhu4MbFrK+gyp/5uD94YbMk4Mq4vdhPRNRdUkVo/6UVMQ4bAqrJwsgbkaws9o/ uGqrHnzEtwaWYN1NPaYLnpU2e0bpzz/mSadd/ellxoePSI5p8BHlwRgiB0+ZKfgNt+LrTM 50SEqtSWYIhVukKgFdv4qN8L/xOtVNgp2MD25nzTTKF7fJh91VX1lHmwHqPKPCHb/TsHcY 4RLfswCpi3b0KmWmjGb1Nyd4pafKI3FaB1u04iL3qMb/HBNW5e7dNT+R1Mx1iubm2K3eso ESFIXVIc/kDgs6Kw0qKIzU29JUaX4Evbt5D6F0SdpTaUdnwhKFodw+DCHMByJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DD4927C0C; Fri, 20 May 2022 00:20:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24K0Kw8d071812; Fri, 20 May 2022 00:20:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24K0KwDm071811; Fri, 20 May 2022 00:20:58 GMT (envelope-from git) Date: Fri, 20 May 2022 00:20:58 GMT Message-Id: <202205200020.24K0KwDm071811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d2ebb215b8cf - stable/13 - arcmsr: Remove never-true NULL check from cdev callbacks. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d2ebb215b8cf5f9f931c611332de352e26a11bf3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653006058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MyWtwfgWVOEGMx5gNlYMJMWUM6j+GBycuPEFgrt9zhA=; b=Smdczj9iHlORRIDTLvotFjtqdcUdiWPbUrDDB6Xa2GjZ7wBl+6UqHWH9nq0PwbsYDI8X5l YVhqxa4tlygO78PPOWDhpglj4kvDsafBIVayJOAuF9eN1JCyQ1nmA74vuzwXt6cNdnSUpg xsA8za873SVIz7HKf1m+v0WTutc7dgCq1ZUm/lgtmLd5qZHcQz7KWvlsYOVPzQUdvITAMq W6G3B1V34EtgmVcNKCCHwy56ZkldGiCAxhr1ONw71knB/i77uohVzQN2+aXBV30sACbicn QiDeUUJ6R14ZIWHiwpQVi2z9QzvbhqcLg8X/8B8S5/cefpvhEamZ9tuzn3YZrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653006058; a=rsa-sha256; cv=none; b=wN2ImWISmIZlKYn2sBmLTnS+bQ+2fgp7YZIHrYmnf9yp5awtZZSWYISKV4GoctBgfGwcdo t0oZXU/GdIyyTmOEBhuLkLipoqtqPZ9vqL//WFiWkFDd4ZbaX3omda3RvBcCJOvou0oWzC 5ShS2DxQ3MC9Xi7+b4aH1YCIPreUZi5pk2N7/C2+fC2dylTQO7MLNiB2YPgnkRGwRULl0C 6TvU06BNcmCbuIt4iotuPVJpIMUiKoyObaatiJHkesCoLCG1UwSqdBXhDvvZ77tF2HrTX+ qefpe9zTJ4umAD8kaD3BLQS5Ezt1HRudJaMNqFnHLKhKhIOLs1jbMB8ciVb9Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d2ebb215b8cf5f9f931c611332de352e26a11bf3 commit d2ebb215b8cf5f9f931c611332de352e26a11bf3 Author: John Baldwin AuthorDate: 2022-04-21 17:29:14 +0000 Commit: John Baldwin CommitDate: 2022-05-19 21:33:02 +0000 arcmsr: Remove never-true NULL check from cdev callbacks. si_drv1 will always hold a non-NULL pointer. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D35005 (cherry picked from commit 108adb2ff52c73a92837452ef3ed641053bd1b6f) --- sys/dev/arcmsr/arcmsr.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c index f64093a94e7f..6a21a91fda58 100644 --- a/sys/dev/arcmsr/arcmsr.c +++ b/sys/dev/arcmsr/arcmsr.c @@ -240,11 +240,6 @@ static struct cdevsw arcmsr_cdevsw={ */ static int arcmsr_open(struct cdev *dev, int flags, int fmt, struct thread *proc) { - struct AdapterControlBlock *acb = dev->si_drv1; - - if (acb == NULL) { - return ENXIO; - } return (0); } /* @@ -253,11 +248,6 @@ static int arcmsr_open(struct cdev *dev, int flags, int fmt, struct thread *proc */ static int arcmsr_close(struct cdev *dev, int flags, int fmt, struct thread *proc) { - struct AdapterControlBlock *acb = dev->si_drv1; - - if (acb == NULL) { - return ENXIO; - } return 0; } /* @@ -268,9 +258,6 @@ static int arcmsr_ioctl(struct cdev *dev, u_long ioctl_cmd, caddr_t arg, int fla { struct AdapterControlBlock *acb = dev->si_drv1; - if (acb == NULL) { - return ENXIO; - } return (arcmsr_iop_ioctlcmd(acb, ioctl_cmd, arg)); } /*