From patchwork Fri Jul 12 14:04:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13731842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87436C2BD09 for ; Fri, 12 Jul 2024 14:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=VghSScXg0SnQ65hjRgRRdsd386IPCF3v3rBLbMWrDA4=; b=nh9ZW6VKjAjuPus6ddOupU+paL nbVKQrlO+3QxRwHMkVVfF3DyHeYnu9oms+926pOxGbroSXp8/ka0ScMj77YEjMGykYJVmx5i0dq2Z klhZ1HBRRv8WDTBAWSbmMqQjRsXqti9C0UK1ApI/kiuVu22SMk5npyzhcr+ou+u4dDq0avzeqQ7sf 7GD6zvCrnr35PwGpUvKNif3RyrQ7CKkfrBdK/WjltUtvxcAMNHUc9yLuN6tZr+E1qVFhIml6JHqEJ nliDNU5bJPl2y+Kqcy41SpvgWPxrbDmR8hB1hNdxi+vCx37tQOu724Eu4mYxEcjOLmio5sAD07f8l kEU9TnJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSGtm-00000000G2e-41lm; Fri, 12 Jul 2024 14:05:22 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSGtU-00000000Fy4-1J3X for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2024 14:05:05 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7036e383089so1148357a34.2 for ; Fri, 12 Jul 2024 07:05:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720793102; x=1721397902; darn=lists.infradead.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=VghSScXg0SnQ65hjRgRRdsd386IPCF3v3rBLbMWrDA4=; b=M4lUJzgnGSFtlMuTdH399rbnaG4ZnIcCvlRSI3P+ruHgklgs1pHxFb7zwV85ApIMLl t0J/4r/quTNdhEizsR5IMfWC4e9aWnR347+1GI7MhW3SK8jR0GDshxG6yeOSQyjms44W YmKYojyHZLt9bNida9B0GL2vrQv8rSU/RIRPvtMpriXJI7vULmmCxh7mVM8Q6bAV/ep2 HMkdBEDV96OSr+K6P4rWiECen7dq3W30ZuYns5/kqZfPKccQ1JhtQhU6/+FhQB5cHXVK 9lMBW1qStNmsNnXMxlFUL1WmD8fzdM8es3DQdZKbQa6XYcLqMCaeoG5jXDis2VxPUQmC GhdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720793102; x=1721397902; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VghSScXg0SnQ65hjRgRRdsd386IPCF3v3rBLbMWrDA4=; b=u8CLFdcA0jOj5IZS7TUhKm8n0Znf2MhjgtM2/feR8yjpcdi7fS8tPao+n+jRXCSNTz oqpKPjU+a2Va2VoBJbHU35tgMExQyZxQ4HJH/V4nPu9cNfePs8yh4kWmsXMFB5ScOOcN j1hTv0PSPNyIbwgtZQLgitgrCBINJDDWu/YXhxz0VYJ/cBIJ1h4k2a8XDwHg83YI1L1i OFm9GsxAo0m+T+Tfy9sRkO2Qq3cAY7q2UneWybontiVWEUiFfWUZjgN1bScCQ8FTLpTv ObbljDGkA0vz7ipuuZYSvovXMo7np47ksbkvBx4WNdkO2fhA3Ae3ZgvyxHopI0Pr9ynW VGnA== X-Forwarded-Encrypted: i=1; AJvYcCVinexARg9gEnd7Eu0N9d16GpX3mnpAQ2DI9OsPlLLZjLM5OnBe/Y3I1zFLm5JWuY8tpTix4AsYQOvHED+NhaQ2ltCHE8LZxK2PdwnsMx8qbSTtX9c= X-Gm-Message-State: AOJu0Yw4jBQvt5OLbKcslVNMAhlLKKxeD/Y4xnIfukwj1lwdcEaJUt3V QhyHbbkBjhJtMY2gXY775omtdiTMUql7iW/Doek9rihQ+yHrvVmakL+kEgGEdaClWh6aKtKIbKZ 3 X-Google-Smtp-Source: AGHT+IFA0p4jpx4ZTZg5gSmdCsyYovFZ3XvuMQom8jLmz1vaX/2ViXszD44aiF1MHSHh4j1LYznztQ== X-Received: by 2002:a9d:759a:0:b0:703:7a17:f267 with SMTP id 46e09a7af769-7037a17f53dmr12708239a34.26.1720793102310; Fri, 12 Jul 2024 07:05:02 -0700 (PDT) Received: from localhost ([2603:8080:b800:f700:d26:9826:56eb:a2e5]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70559902e6esm847390a34.35.2024.07.12.07.05.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jul 2024 07:05:02 -0700 (PDT) Date: Fri, 12 Jul 2024 09:04:59 -0500 From: Dan Carpenter To: Hector Martin Cc: Sven Peter , Alyssa Rosenzweig , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] nvme: apple: remove some dead code Message-ID: <124bbda3-7ccf-4e6b-b30d-7115e1c2620f@stanley.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_070504_380577_8B9F74C8 X-CRM114-Status: GOOD ( 12.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org platform_get_irq() never returns zero so we can remove his dead code. Checking for zero is a historical artifact from over ten years ago. Signed-off-by: Dan Carpenter --- drivers/nvme/host/apple.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c index b1387dc459a3..f5a3a4e8b1e5 100644 --- a/drivers/nvme/host/apple.c +++ b/drivers/nvme/host/apple.c @@ -1417,10 +1417,6 @@ static struct apple_nvme *apple_nvme_alloc(struct platform_device *pdev) ret = anv->irq; goto put_dev; } - if (!anv->irq) { - ret = -ENXIO; - goto put_dev; - } anv->mmio_coproc = devm_platform_ioremap_resource_byname(pdev, "ans"); if (IS_ERR(anv->mmio_coproc)) {