From patchwork Mon Jun 6 07:32:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 9157317 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 20A14607FD for ; Mon, 6 Jun 2016 07:33:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FB7527D45 for ; Mon, 6 Jun 2016 07:33:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03DE22821F; Mon, 6 Jun 2016 07:33:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BE2C281BE for ; Mon, 6 Jun 2016 07:33:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148AbcFFHcx (ORCPT ); Mon, 6 Jun 2016 03:32:53 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:36204 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752144AbcFFHcv (ORCPT ); Mon, 6 Jun 2016 03:32:51 -0400 Received: by mail-pa0-f68.google.com with SMTP id fg1so11229422pad.3; Mon, 06 Jun 2016 00:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4ITBScUEWlv+KTOa6GETA7+3gvV2/QqNbPjPkSbXcW4=; b=DPtnsBYwbZJg7PZqlBAFnv7sSQWpttdgInwqRvm2GMOn7rraY+8CqmNjO81+f+hxkb qL2F5TYBlViZzm6vgeztpkxtDf4TqFM1yeDZL+OTppEGnB5Z2BXuwqBR/afvbqtqFRIy KIvrC3fP+dFjYhW1SPp9ML3sOQn2sXf0TT3wiV2ARgwMtWdjGH415Rud5O4tL7W995/7 wJ1N08lZxlJLsrdkwYRtok1wylU1gb30l/FfPo+QfcDiBLhmttAjmsDPtNXT+KAMI8VC NAkkr88KwxR9YV8rEMegdCPjh1sWs/wcqNqKFN8Z+OXb4m3Jz6BXnra9pAwoboXY//sL mBow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4ITBScUEWlv+KTOa6GETA7+3gvV2/QqNbPjPkSbXcW4=; b=BOF+Q5+ZMXucR9CNvQeMELT3arOByg1W1jRKmIZW3HrJ8igJPS7ByCgKszBhMvcE5D jW9jOfgvMDVXUVwO9GsiebqdTcZcCC2VIoBlwEJ77usn2B09M44rCPeTcUgwegH3fTrj h2mT/qqMTfTsxTgeCW5DBKxkG+vOiKB44YStCoiruqlJ96FBLkEBTppJbdYNDAd1YCvN XnwB9mbjM7qbqraWz5XMjnVUy3yTG2Y+CUIeqsAOER57eNCLXQ+cSfeR383WOxfpXAZK daeFOcRkkwhihipe1XlQ7YyniJZgi1kdvMRFfw7d2f/H/jBwNQrLbgSZCyzCNMU7DNPH cLVw== X-Gm-Message-State: ALyK8tJVnGcT1h1jflDI4V3eCyM32sqrgEPHg5ScbsrLtfL216G56/LD89hyHqZPUvjHVg== X-Received: by 10.66.73.193 with SMTP id n1mr22973696pav.70.1465198370614; Mon, 06 Jun 2016 00:32:50 -0700 (PDT) Received: from localhost (port-6551.pppoe.wtnet.de. [84.46.25.176]) by smtp.gmail.com with ESMTPSA id f66sm25052318pfj.28.2016.06.06.00.32.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jun 2016 00:32:49 -0700 (PDT) From: Thierry Reding To: Greg Kroah-Hartman Cc: Bjorn Helgaas , "James E . J . Bottomley" , "Martin K . Petersen" , linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] scsi: Use device_match_always() Date: Mon, 6 Jun 2016 09:32:38 +0200 Message-Id: <20160606073238.1073-3-thierry.reding@gmail.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160606073238.1073-1-thierry.reding@gmail.com> References: <20160606073238.1073-1-thierry.reding@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding There is now a common implementation for a match function that will always match, so the SCSI-specific implementation can be removed. Signed-off-by: Thierry Reding --- drivers/scsi/scsi_proc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 7a74b82e8973..4adcdc2caf27 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c @@ -371,15 +371,10 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf, return err; } -static int always_match(struct device *dev, void *data) -{ - return 1; -} - static inline struct device *next_scsi_device(struct device *start) { struct device *next = bus_find_device(&scsi_bus_type, start, NULL, - always_match); + device_match_always); put_device(start); return next; }