Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3547976pxb; Mon, 24 Jan 2022 11:58:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzX7MjHgTkS5Yrp24z333tG89aWgWKxR7xIwxYYVd72jWEW0m/SqhU86yg4pF8F4R7ZqVl8 X-Received: by 2002:a17:90b:1802:: with SMTP id lw2mr3482830pjb.232.1643054283530; Mon, 24 Jan 2022 11:58:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054283; cv=none; d=google.com; s=arc-20160816; b=aTu/1QbuDvEyvQk11wTGVZp9RzRUdFqqXC8ke66rV8JtTCq0NMT0lPpyGxb2rn/Fa/ n/YNymoYj6M58w+0Zi31GY6rSvcEgJIfvp1+zuP+1E/+EqUZnsc1iH6JlqdxjN+W6Db5 tE3iqbdGxzYTa0gJAtB64hOv92kU1Sus7ksbXkBXkP3BNj9BlQhFKMrXYSNFoX5z4wq0 7/djz2Ll4BC6WuYiwkjo0/TeOztYrB9gkdidQ+b/E932XUMD5nDUILWgcJh55DGsdRTb Q1GWO0L+UNFn0VFlsFM6+irRuen1DZwp9h9Sj5JKvq9p3Xec6hy5CKJ7UDrMphwgKJKB /Ghg== 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=NMoHplM4nTtA3oRUCOxbKl0k65rNeDfS5y7+a7gGlI4=; b=LdPF1sjxjjVQNtHmXVTzSQKkcEcN9dSy/TvXnBSFg7XoasXuCG1ANyZiZfh4KELEKB U/ZUZ9nesppV7LMt8kPJrfJKxYo6vJwRDqt4Y9XTa6O8IDf4XxuhDYYNgFjmeTTpFMxk 5bXXNoTIqmkRauW0f2Xtv2NtbpS/WlQ69P7+203uo0yTyZq4zSDumOrDACcmIlZkAq+K tghQs44u8ORry7sV9IhpmIvzjvLL6LsWb7HME7Pta5/EVVqJPPEfIolGEdSD8xgghcns qG09QakJPggYIGPXXoS8u1w9/PdUgZr5nV4WRMuOfhV53wQlr2i9VdEeyH95wTPKj576 LMmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HB06RHFP; 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 a72si11150410pge.425.2022.01.24.11.57.51; Mon, 24 Jan 2022 11:58:03 -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=HB06RHFP; 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 S1343970AbiAXSy3 (ORCPT + 99 others); Mon, 24 Jan 2022 13:54:29 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:50822 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236401AbiAXSwq (ORCPT ); Mon, 24 Jan 2022 13:52:46 -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 07AEBB8121B; Mon, 24 Jan 2022 18:52:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 191D2C340E5; Mon, 24 Jan 2022 18:52:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050363; bh=1WUYU2h+Ihp81t3u07UTnT8V09OXmsMPudnXV6CtIy8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HB06RHFPxJSOLYs/MiB2bsTrTvfAc/z0rwkQS2QsptjEWfLjOhf3e7hE4U6KcUbAE pYlS7E9jK4bHPNc6ccv9xNaWjouTHmNkciLudU4EJl1yR8BTpbx6Bpd1htRYE8qQPN wa4x4w6It/ZDwPs56kGo4L6sY90F7mhBwSXLM8Yw= 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.4 095/114] scsi: sr: Dont use GFP_DMA Date: Mon, 24 Jan 2022 19:43:10 +0100 Message-Id: <20220124183930.045525842@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183927.095545464@linuxfoundation.org> References: <20220124183927.095545464@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 df019b78d9f79..e26d6cc3c8716 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -883,7 +883,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