Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3563275pxb; Mon, 24 Jan 2022 12:17:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZXwH5LDnssHlc2qT4+DR/Q8vC4hKlWtSzc3+bLLotfa4YZvmdcTIR+/u/fQWsEaGt5G7t X-Received: by 2002:a17:902:d4c3:b0:14a:f56f:be3d with SMTP id o3-20020a170902d4c300b0014af56fbe3dmr15512861plg.6.1643055471164; Mon, 24 Jan 2022 12:17:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643055471; cv=none; d=google.com; s=arc-20160816; b=MGy24zUxmc71S9cLz+b5o0PEjFWebGeV78sZICpX4uSfDLD2uABKXUzdRlxmU86fSD QbrY9J1DpIIqdGYSa/MV1WvGgDbLJvmsZU98q8B8c2PPFrkSKmsAcAwKC5rrkyAlCDvn oDIfZBmW2fjZWmvHtyGBr+qWGZIjpubyCLEuuSyCo9+ORoQ4FCRVGqO8p2yq5PLIwNpQ f00rgGab7jQWHDI/NvR756yCLtlmUxw7L4GbECApleIz0yofdqetCVvlGuFn8X5qwOvF COrwa9TbtutcKppMMT2/OGbI11Fqyj4B8vrD5fj90Hq8NWD8fZKYgZ8iEvbxsNqfWxfv rJiQ== 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=dluU4KX3QJt4aZkwILEFSrZis/Mpfvmuy2yu2qeTHK8=; b=GvJdDtlSc8++ZVIGcrnLmMhdGzksP/pfb/3V/sxNnH+iMHX9/b9RHcBuFslcrZXcTS 7hlRt5khOq2nGkRVvXSeBVlgaxrTmc1UOdbn3x8J3eB3NVaQK4i4xzqd2qGz+WWEG0ur +Ruf50KPTBLGzPmCEJnooVl26qNttjYlVVFDnszjaT1s081FnGZBX5Ep4DEOFmFH07fB ULtML8sDmAmSQhu+EZWcJicLUxGoH0S9hujY7AsQd3bEw5OlG/VArIl3ywFHGuwcT1UD lSoq7IkBG1XUi5E3419aMy/G8NTNsoHPqsZiXE1SRi3zzQPMtGABNPA4i3kSTglScWGX 4evg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ykzvh0uK; 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 m4si4023063plx.573.2022.01.24.12.17.38; Mon, 24 Jan 2022 12:17:51 -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=Ykzvh0uK; 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 S1348871AbiAXTTt (ORCPT + 99 others); Mon, 24 Jan 2022 14:19:49 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:36414 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347827AbiAXTLM (ORCPT ); Mon, 24 Jan 2022 14:11:12 -0500 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 77718B811FC; Mon, 24 Jan 2022 19:11:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E68EC340E5; Mon, 24 Jan 2022 19:11:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051470; bh=4k2z4KLtYvdYk31HaIx1OrD6ZDakKeeWxnh9mTjMlRk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ykzvh0uKlgAaTqHvq9SGTrYi/Z+bxy5JjckihQphPF5pzkTsOaHOyypGbXpi6ylMo Y4pRCSSOausjuyrMlCYDihD9321aPK8MNC577nNOX8UaiLWKOZFmebwIgW9d9kzBCM goQU9PZ7v7c8+uVUyoT7GmZ4DaJtOm95fNSxVHWc= 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.14 145/186] scsi: sr: Dont use GFP_DMA Date: Mon, 24 Jan 2022 19:43:40 +0100 Message-Id: <20220124183941.770293747@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@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 be2daf5536ff7..180087d1c6cdb 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 e3b0ce25162ba..2887be4316be9 100644 --- a/drivers/scsi/sr_vendor.c +++ b/drivers/scsi/sr_vendor.c @@ -119,7 +119,7 @@ int sr_set_blocklength(Scsi_CD *cd, int blocklength) density = (blocklength > 2048) ? 0x81 : 0x83; #endif - buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(512, GFP_KERNEL); if (!buffer) return -ENOMEM; @@ -167,7 +167,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