Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3556214pxb; Mon, 24 Jan 2022 12:08:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxNxgi8fWPGObMIxdaUtbx/gqpDw0e68lNRMD4Qf5MCoejbSK0tXwEVc9ncJQM6facWq1Q X-Received: by 2002:a63:7406:: with SMTP id p6mr12777416pgc.151.1643054905830; Mon, 24 Jan 2022 12:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054905; cv=none; d=google.com; s=arc-20160816; b=rzu40WAoiCkfB+NFmrUVLohSMm86y3XDt0bxW9xPA8lNC9oNoK5Sq/ipP4l55sRqO8 JWoMzhI1TNtf4Be9fVKKc9hes0fB7b2ScnWvwLhaBYDrA2E3hY8nAsRODbjpJdKMcYwA cjeWTEWHWJsRPCjzfFoGGnfcagN/nTbVLiUI0IkN2xNc1ZNTBTAtnbbPtP5UVIcwYyE6 1VhLDAjb4rUvM/RVbcFwGiBhb+2vLskz7wd6YedDrftwebDhYIWlm8OJ2akCNdJaFjYB cgHOnLTlxKd2zrsd3J8QXVvBFTOWE3NzuzeXQmvChaZaUsO+nGMB/M+kYAK8y07KWvNA Q/Ng== 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=hoe7YFHJRCDIkJfQiwcG/m/+8mDjdrGR9RlwcvHGBBQ=; b=KGXYJzu6YaIED5GqYAptPbKGcGnotnS+bT7+sydQWMCTnLKS+xyprLnzFDsCAF+AFs T82C8yQaXBxM11rqpRvXny6Gx6aOu5xRpy1vxKdwbhnwRqE183j8LmdI7AigxISV/l0G RVn6Y2pvBIeMc4HSQpWYYlcYjMHrqVqTgXHElXxHzX442ndJ9zvZ0NIw4qOlLn4ty61j YSObVic6RcQhG0Sw6kw0ow5W3EH0lE0EusJiTvKlLfvwHuBPcn6Qyq1SYTIG7SN1I0Ao whc925iXDAmcpqX5+C/6mRNGZdciiV3QepqtXBdDabgFulKMzDFtwBEsNami2B7PM0lW 4lYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eqiRpQTA; 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 r4si268755pji.6.2022.01.24.12.08.11; Mon, 24 Jan 2022 12:08:25 -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=eqiRpQTA; 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 S1344757AbiAXTIA (ORCPT + 99 others); Mon, 24 Jan 2022 14:08:00 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:57470 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344597AbiAXTBn (ORCPT ); Mon, 24 Jan 2022 14:01:43 -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 07F33B8123D; Mon, 24 Jan 2022 19:01:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3907BC340E5; Mon, 24 Jan 2022 19:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050900; bh=GmG+/voixByuzyHwsMFBsuj2PX+ZSiBIZM0+gB8/Sjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eqiRpQTAu0D67xHnugDBo0GEuNdZMYaEsqwqxT6WeEC641xHrn6+FtbSov/Cb+hPd YSo+9sZCDcHm3/ufBp04Hj1zYSfWalCkDFxIUcyQ/WShFKr21b/NI6GfoGJJ/Epzrg ZNnhcJzetHzdqQ7ypN7vPT+OFLHbSPeENO/VDFsI= 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.9 116/157] scsi: sr: Dont use GFP_DMA Date: Mon, 24 Jan 2022 19:43:26 +0100 Message-Id: <20220124183936.462228849@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183932.787526760@linuxfoundation.org> References: <20220124183932.787526760@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 9b63e46edffcc..a2a4c6e22c68d 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -882,7 +882,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 11a238cb22223..629bfe1b20263 100644 --- a/drivers/scsi/sr_vendor.c +++ b/drivers/scsi/sr_vendor.c @@ -118,7 +118,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; @@ -166,7 +166,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