Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3577758pxb; Mon, 24 Jan 2022 12:39:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHwZuFn2deL7R3Um21/tYswmi924KmlIujhPQNA2jRZ79qBbkuZY3/xq/HdgEh6EcoofFH X-Received: by 2002:a65:5bc4:: with SMTP id o4mr12684559pgr.489.1643056774451; Mon, 24 Jan 2022 12:39:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056774; cv=none; d=google.com; s=arc-20160816; b=CjZrcXhdv066MId0072wYMZEE+4Z0UtKIHiddwhARIx435KDfU7L2H9x9otdduc9mQ nklBlojjUuJR3TAlVZ+SvzpIz86nu6T1Bn9StDIF3CZpeManRKkLL6tnFX1swblAO/l0 j1A5N5GKqiA+8ZJ5cf3ux+NBbDQC6r54Cnopu5f4+F7sDLZSvSkb4NGXQ+08zVAl+j7K YEFbOAyKJJMP40mC56yJ2z/C+ixifW44mZb8fVbIJ108CUMS0GDvHYhU8r7XW4VP8wxn uHhsqzKmS5PqCJHMIbTzYVtdyzhQusLuppIsFO3dcBcneKvU9Z9tjYd5R6R0TrcGX/cN S3dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IU/e380MVZ+mO8UHnQ+98PiWFRFpnMb3h34hmnjofWk=; b=Y+Dd3nXWdlnWhO7TIkuc2CjorqbntNrfcLNtSIS910cVhiqDVyCOOZ/zmWrQTr9Z5M yLwYbXxzhjEPUmReZAQ0Za/MGtBPm3c0CModxkBBP+RCJYD/C+cbH1SAzayMd4KzH6Pz 8Y3Ge4UK8aGillytVnMj6OrCCzPMpwmjCqD1lAwyjpTT1w/TQ4nwvfKQ77vaTL+dREsX pJvEEAZip8aZPLISkKAx8QT9WpCMHp8XOE5SS8oMDY9bQjGlJz/GWtqrstC+o9lSwZwi iX7M1IMueMDicpOc54I5Avj2ykT5HU2wVRC359DIvMbx46WZB5E6DxYlObipOaTExslI amqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2tFsebKf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb5si361848pjb.1.2022.01.24.12.39.20; Mon, 24 Jan 2022 12:39:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2tFsebKf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245180AbiAXTxW (ORCPT + 99 others); Mon, 24 Jan 2022 14:53:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348646AbiAXTmg (ORCPT ); Mon, 24 Jan 2022 14:42:36 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBC06C033270; Mon, 24 Jan 2022 11:21:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 60631B8122C; Mon, 24 Jan 2022 19:21:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FF81C340E5; Mon, 24 Jan 2022 19:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052107; bh=dPECgQQvYcxOo2hldr1cbm6OU4xhatPfSlbAjSYEegw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2tFsebKfXfDRZT6i3k6ZWPH//jwcd/jRjLF+4cn2A038cREKif1AcCD0yFYqraww9 iciCc+ZNGojoiSjItNMSA2+vBfnEznvm4pC6dw26ZXJFkJFhOM7hMHpz5/E7AHkqIj PICiJbW/iBAMzXWNeXWcGLDUORJtOTpZ91C0sPC4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baoquan He , Christoph Hellwig , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 192/239] scsi: sr: Dont use GFP_DMA Date: Mon, 24 Jan 2022 19:43:50 +0100 Message-Id: <20220124183949.219917316@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183943.102762895@linuxfoundation.org> References: <20220124183943.102762895@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig [ Upstream commit d94d94969a4ba07a43d62429c60372320519c391 ] The allocated buffers are used as a command payload, for which the block layer and/or DMA API do the proper bounce buffering if needed. Link: https://lore.kernel.org/r/20211222090842.920724-1-hch@lst.de Reported-by: Baoquan He Reviewed-by: Baoquan He Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/sr.c | 2 +- drivers/scsi/sr_vendor.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 84dd776d36c33..fdbd5c691d333 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -885,7 +885,7 @@ static void get_capabilities(struct scsi_cd *cd) /* allocate transfer buffer */ - buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(512, GFP_KERNEL); if (!buffer) { sr_printk(KERN_ERR, cd, "out of memory.\n"); return; diff --git a/drivers/scsi/sr_vendor.c b/drivers/scsi/sr_vendor.c index b9db2ec6d0361..996bccadd3866 100644 --- a/drivers/scsi/sr_vendor.c +++ b/drivers/scsi/sr_vendor.c @@ -113,7 +113,7 @@ int sr_set_blocklength(Scsi_CD *cd, int blocklength) if (cd->vendor == VENDOR_TOSHIBA) density = (blocklength > 2048) ? 0x81 : 0x83; - buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(512, GFP_KERNEL); if (!buffer) return -ENOMEM; @@ -161,7 +161,7 @@ int sr_cd_check(struct cdrom_device_info *cdi) if (cd->cdi.mask & CDC_MULTI_SESSION) return 0; - buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(512, GFP_KERNEL); if (!buffer) return -ENOMEM; -- 2.34.1