From patchwork Mon Jun 11 19:42:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10458719 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 9B81D60467 for ; Mon, 11 Jun 2018 19:39:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A38B2856E for ; Mon, 11 Jun 2018 19:39:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7EFBD2859F; Mon, 11 Jun 2018 19:39:57 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 3F8ED2856E for ; Mon, 11 Jun 2018 19:39:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933595AbeFKTjn (ORCPT ); Mon, 11 Jun 2018 15:39:43 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41979 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932823AbeFKTjm (ORCPT ); Mon, 11 Jun 2018 15:39:42 -0400 Received: by mail-pf0-f195.google.com with SMTP id a11-v6so10770836pff.8; Mon, 11 Jun 2018 12:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=X2hLEhf61E8TNoM8JyZCeslkEPZdJuF3n+7rqdu1BKw=; b=LE+Rd43ci7ruw1AOF07ns62gSzUjqZVcrXw2tbfJ1fXyI6g7In9Zi37rN5rx/CsS6/ D6EviHfuN/lEu9ygv6QMfG89QwQviR5rWpcxXgOcMx50wr1UIfGaTq1dClMcbukv4BQp fb/6S9TFfrFM0O2D9WJpd3WOS62SwAiecqqbePUbp5b9HpFdZTG0lv3CRW1FBcAOU3+S s6vKp/SRy5PXcxEkiEarr1iToeiEUi/f2vfqVd6s9qQrCStVluKmO44pDS1dDFcdu5mk 4DV4WLj7TM2PGRQXM0W7wy/dPccsv2/qrnMEZvpO9ztmRQ/3FxpWfdIlMTCEMRs95K+S KV0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=X2hLEhf61E8TNoM8JyZCeslkEPZdJuF3n+7rqdu1BKw=; b=Dtal2Vs9wBV+PVzlw0WTW6hSVe44l+6yIPnQxqUe3PLJL8vn+RzOUBrG9yKV1t+sQW 3sQUIV5jmb70vzSGkiRHrnh2uJOsDjBsdIEvrIHCGWCxwswrDwMdMiyCwuNAw0kc1lpQ UAMgYxkLQzUJq4MAYTd1bDkSB7/+V/cnwW2v9ZmZjUk1xDKhC2gR7aDpmClUBaGnCdo7 CGlEdAdPpclTlvBglpDHMhYAz9/8YMlRTOftSdiLFSGC9UQj/FcsAFw5jfthjh1wD+/H 9W8f3I2UTa150LYXMrUC6+DTnhxJw1+5Ic5FZIFiS31ETAZP7jsNxQmn+ZIBeZ1UmSss MR/w== X-Gm-Message-State: APt69E0A3OiClL8g5fyEOyzVpvaIP6lE2m1BA1I/QwTD+QfkwIRyuSE/ R/MfJjRtEsVzbPv/NQcgWJE= X-Google-Smtp-Source: ADUXVKKLcUvViXb7rzI/av9eJ4+cqyv9KSrechrS0HojBGe9z4oOm5IjW5CnlIoZwfJdy2TcYLw0aA== X-Received: by 2002:a63:6e4e:: with SMTP id j75-v6mr424089pgc.125.1528745982239; Mon, 11 Jun 2018 12:39:42 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([183.82.16.65]) by smtp.gmail.com with ESMTPSA id p1-v6sm9402809pfh.58.2018.06.11.12.39.39 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jun 2018 12:39:40 -0700 (PDT) Date: Tue, 12 Jun 2018 01:12:04 +0530 From: Souptick Joarder To: willy@infradead.org, manoj@linux.vnet.ibm.com, mrochs@linux.vnet.ibm.com, ukrishn@linux.vnet.ibm.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, sabyasachi.linux@gmail.com, brajeswar.linux@gmail.com Subject: [PATCH] scsi: cxlflash: Change return type for fault handler Message-ID: <20180611194204.GA18687@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t") Signed-off-by: Souptick Joarder Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/superpipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c index 2fe79df..a4e4c50 100644 --- a/drivers/scsi/cxlflash/superpipe.c +++ b/drivers/scsi/cxlflash/superpipe.c @@ -1087,7 +1087,7 @@ static struct page *get_err_page(struct cxlflash_cfg *cfg) * * Return: 0 on success, VM_FAULT_SIGBUS on failure */ -static int cxlflash_mmap_fault(struct vm_fault *vmf) +static vm_fault_t cxlflash_mmap_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; struct file *file = vma->vm_file; @@ -1098,7 +1098,7 @@ static int cxlflash_mmap_fault(struct vm_fault *vmf) struct ctx_info *ctxi = NULL; struct page *err_page = NULL; enum ctx_ctrl ctrl = CTX_CTRL_ERR_FALLBACK | CTX_CTRL_FILE; - int rc = 0; + vm_fault_t rc = 0; int ctxid; ctxid = cfg->ops->process_element(ctx); @@ -1138,7 +1138,7 @@ static int cxlflash_mmap_fault(struct vm_fault *vmf) out: if (likely(ctxi)) put_context(ctxi); - dev_dbg(dev, "%s: returning rc=%d\n", __func__, rc); + dev_dbg(dev, "%s: returning rc=%x\n", __func__, rc); return rc; err: