Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3937388imu; Mon, 12 Nov 2018 03:08:08 -0800 (PST) X-Google-Smtp-Source: AJdET5dsR/klTD9PtZoGiT0972NazXV9y2L32jXMLSCyaLbDCOvLm5dxQpcDczZgrpSEE0uCFu62 X-Received: by 2002:a17:902:aa84:: with SMTP id d4-v6mr513062plr.25.1542020888218; Mon, 12 Nov 2018 03:08:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542020888; cv=none; d=google.com; s=arc-20160816; b=Y7NflFO8u27ChEvqko4uusIKeRrNm+NCec7DsGpj+hQQhoqyGqC6ISO1iw8w42YsTZ cHdvv18N5wjNcc8k/dw8EYc524gVBtaiRtYVDNu/AXYQmF1TimmXCEP+DSKJ1N7qP2qD +07jaLwn2sHxM7HiX0GY11+Hy4LbnKQFEuESlOcc++XLrzWYzlGWFG56cgWyFWh3v1VG SSd182Ntyqe+9ZdGsyfCxop61uHnZ7eii5VQu1PQaEcsqMR1ebvYEykvp0aR3D/i17p1 falt4iAeXMAmiQjk/8CNvjlyEl+6l91Mr38nGbsAPXNac8tHEXbxWTyCom9nK+eVlYBB tnmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=vKlOBiuFbIol/qgBBWZ68+LA2QXtyJLGRQ4ZpHNWM4Y=; b=a1C73P0lw8ZFBXpFoZW8NF3V6Et0Zz4eFuw+bF2RIfPrGwSZWUKq9PKo7jh9OhLK+V Yic2blNrvzt9S1tpHOgKveycyonlVmBn4nf6MKnEostZXCxxO8QcD5vEdNI3dfVmDTTa AJ2jTHuPV7IzBmJBsiUtdNIAuw7YR4Kx/pqdRlLEuWmd7eO1kCA9LntgUQkQKanZXhY6 stEIRWmloJMsCMACFGXyt7mcJvS/8TPWpLqS8YP1S0RdVX1raYEYi0G0HB0rg/cHy32a 0JQmHNh04xdp2FhTgwqqb/Q6+dM9ZJfZqZCKb/Uy4xq+oN+ffUTcVYrVlKs6xuuhuvPh Gl9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YPqVVcT1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t126-v6si18987130pfd.133.2018.11.12.03.07.52; Mon, 12 Nov 2018 03:08:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YPqVVcT1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729302AbeKLU6s (ORCPT + 99 others); Mon, 12 Nov 2018 15:58:48 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:37658 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729248AbeKLU6s (ORCPT ); Mon, 12 Nov 2018 15:58:48 -0500 Received: by mail-it1-f196.google.com with SMTP id j79-v6so12581719itb.2 for ; Mon, 12 Nov 2018 03:06:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vKlOBiuFbIol/qgBBWZ68+LA2QXtyJLGRQ4ZpHNWM4Y=; b=YPqVVcT1egygCplqeF/iHDVXsJrK5uBHUWvwI+Wuwq/oAHrme7KMKkzyrPLbgiTJR0 tSpnoVuBkM7umtPZyqvN+COz1Mn9KvEbC6nY1zDNPwSyMYpWOWwtLSthK/f4C8uJiLX5 RrTn3uqJpMlu5G3a0IDiheGViutYdwxk03eqQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vKlOBiuFbIol/qgBBWZ68+LA2QXtyJLGRQ4ZpHNWM4Y=; b=U6yWBr/f1Ae/cqhb9TPZIhhMKzncDHD2lh8/dp0m+thgMRYe24DJ5SKp9t3jWpiH+x ohRJOM6oVN2W9+Xe4Fk1CfOe1ne7xxnC36X67Q4VU+01MgkLmhzWQYFTAn1rGAKd3g26 tii4gH5gb6IX+CxinNCnBelWCLIgQHJKPGVCwjPgeUgKJzXeoTFqL8nEzE4hpCfcvgca 1O25hLeTdLqKCkYkLVCElKycIkKfA9UV8hZ3yW5GFAuWdxc3dPkPc/YefytLA5qn7e38 FcTHO2zsfoeM8mRg/DZvp1WeNg6c6irAvKRUvIPn8AIV/kTYSW1ykj/cgO8AShXsMC0Y G1tQ== X-Gm-Message-State: AGRZ1gL5Y+dL/EZ44tvpTrohbUa0p+Edcr/AqnEOqOWDzYfqUHBbQ8NM dlJMG/FwGdPCu6WSH2sddH7f9ameABioePNPjDQorg== X-Received: by 2002:a05:660c:206:: with SMTP id y6mr5911841itj.157.1542020762377; Mon, 12 Nov 2018 03:06:02 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a02:38d:0:0:0:0:0 with HTTP; Mon, 12 Nov 2018 03:05:21 -0800 (PST) In-Reply-To: <1540433556-12261-1-git-send-email-zhang.chunyan@linaro.org> References: <1540368084-32202-1-git-send-email-zhang.chunyan@linaro.org> <1540433556-12261-1-git-send-email-zhang.chunyan@linaro.org> From: Ulf Hansson Date: Mon, 12 Nov 2018 12:05:21 +0100 Message-ID: Subject: Re: [PATCH] mmc: sdhci: Convert sdhci_allocate_bounce_buffer() to return void To: Chunyan Zhang Cc: Adrian Hunter , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , Linus Walleij , Chunyan Zhang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25 October 2018 at 04:12, Chunyan Zhang wrote: > The function sdhci_allocate_bounce_buffer() always return zero at > present, so there's no need to have a return value, that will also make > error path easier. > > CC: Linus Walleij > Signed-off-by: Chunyan Zhang Applied for next, thanks! Kind regards Uffe > --- > drivers/mmc/host/sdhci.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index 1b3fbd9..e94f4aa 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -3408,7 +3408,7 @@ void __sdhci_read_caps(struct sdhci_host *host, u16 *ver, u32 *caps, u32 *caps1) > } > EXPORT_SYMBOL_GPL(__sdhci_read_caps); > > -static int sdhci_allocate_bounce_buffer(struct sdhci_host *host) > +static void sdhci_allocate_bounce_buffer(struct sdhci_host *host) > { > struct mmc_host *mmc = host->mmc; > unsigned int max_blocks; > @@ -3446,7 +3446,7 @@ static int sdhci_allocate_bounce_buffer(struct sdhci_host *host) > * Exiting with zero here makes sure we proceed with > * mmc->max_segs == 1. > */ > - return 0; > + return; > } > > host->bounce_addr = dma_map_single(mmc->parent, > @@ -3456,7 +3456,7 @@ static int sdhci_allocate_bounce_buffer(struct sdhci_host *host) > ret = dma_mapping_error(mmc->parent, host->bounce_addr); > if (ret) > /* Again fall back to max_segs == 1 */ > - return 0; > + return; > host->bounce_buffer_size = bounce_size; > > /* Lie about this since we're bouncing */ > @@ -3466,8 +3466,6 @@ static int sdhci_allocate_bounce_buffer(struct sdhci_host *host) > > pr_info("%s bounce up to %u segments into one, max segment size %u bytes\n", > mmc_hostname(mmc), max_blocks, bounce_size); > - > - return 0; > } > > int sdhci_setup_host(struct sdhci_host *host) > @@ -3987,12 +3985,9 @@ int sdhci_setup_host(struct sdhci_host *host) > */ > mmc->max_blk_count = (host->quirks & SDHCI_QUIRK_NO_MULTIBLOCK) ? 1 : 65535; > > - if (mmc->max_segs == 1) { > + if (mmc->max_segs == 1) > /* This may alter mmc->*_blk_* parameters */ > - ret = sdhci_allocate_bounce_buffer(host); > - if (ret) > - return ret; > - } > + sdhci_allocate_bounce_buffer(host); > > return 0; > > -- > 2.7.4 >