Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3733724imm; Mon, 30 Jul 2018 02:26:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcZohu18qgTahQgxnDqxBSWa00oBDwVt/4TpZEfgz3UQ7jIfvRbdiVqBRY3K/X41dtKZKa8 X-Received: by 2002:a63:1f20:: with SMTP id f32-v6mr15169140pgf.84.1532942818278; Mon, 30 Jul 2018 02:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532942818; cv=none; d=google.com; s=arc-20160816; b=0G/W0PnguJu8pKLXXLigQBagF0OArQG+TenxuMUdjpV2CBEcCmhEPlYPnVytasEIKK Ti3/E/GysSPthveapWElMJbaS8tVIlKKW3fUM1iC1qnWbM4/DGhj2SBDznVlgdJif7/p 5Ji1AUhdV9Uiq0QsN4QoJ5K2w5Dk8zoUJMdxo+yrk2j9lGpOvq3y28AOzJeuZ8rBBRL6 Qz/6VUTIWVWglOBvrZ1I6OGVYe6tJsmePJt6gwnlrVM/dZhr4DXuT32MFQP8X0zxuzo+ aJwHmCoUUCGkF7m068G1uHM+z5wt02hW+Ji0oYMX5ZHfsTn1lQx/ur/0agzpMKjhDSc4 gQ5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=IzmHTBeBSiVIrmI0rYCsSUBQMd5jnyXOKOPzzJavHxc=; b=QhgCQjIrMGhpO+6N7wRh35mQLnwl32CW7y2Ozjot9KQxAVu+U5NSNx67kj27E5E/5L e7lWNE6xhCzK1yKe792Ozs5ZI0fPWGLiuyj8m4S7o4XqZTvdjZ3mLjqtACaAK/BP4vp8 efzvM4vXxDvYUt7Tfd2s+jgdxxWxTRHlNRv57T3l5ofv9CmFc1AiEJRHs2hHImpe4nT6 Eff9irDBuFXQtvXM2/fbECZPlxOiqkm2dSIzIMdnBQh0zL6H/Uh4FOQiSz7X/U8/JdHK qlb2KKgQ8xG+u6+Bkk/TaOUu6LTnQ3gzoTIYr815kvf/gEv1hLerUeWU+HfxYyI6ahlB rOvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BfAWseYa; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5-v6si10343727pgp.439.2018.07.30.02.26.44; Mon, 30 Jul 2018 02:26:58 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=BfAWseYa; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728750AbeG3K7T (ORCPT + 99 others); Mon, 30 Jul 2018 06:59:19 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45927 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726650AbeG3K7S (ORCPT ); Mon, 30 Jul 2018 06:59:18 -0400 Received: by mail-pf1-f193.google.com with SMTP id i26-v6so4265660pfo.12; Mon, 30 Jul 2018 02:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=IzmHTBeBSiVIrmI0rYCsSUBQMd5jnyXOKOPzzJavHxc=; b=BfAWseYaKEvgzC0aHgGnKNJft7AHpn7jESHCTMlZsHJHnDwabh49b4uelgEAQmE1oF vu4QM8gofRSP+un0GuQ4l2VYZ0poix/HMGIdcCu/hZPOklewk24GKRkPGdqSaK5emMhV IvU1MWKOhmjYiLhpMBcjQVSs9A7aohb53cj5fJzuB0057y2W/XkhXijfGdS0WC3NxFlN Mh3ctW/ZjqfA2eBkfsFkviDwmG/XUj+QnMcVJxep3xsI8dtDo/DzYHuljCLjCh+fT1AC PvDcVumJaSmTmMYM9jV+y5l9n+K2ylz/Tni0eXrBNfNVhWcVgYe/QmLBwFrSdsV2i6aw wXqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IzmHTBeBSiVIrmI0rYCsSUBQMd5jnyXOKOPzzJavHxc=; b=FN5UVkIm6i6ATkV8QfSbFzffEgh8yg2VZEvXHZquHPZqMmxFm/myF5J/om0gF6A40o mXIJcLzpNx8K8Cw6CIacN5IYb9M5TguvTk/AWlddXR7KJNCr04Si/A7+573y83sOYxkO BBw9Cnm8soZA6GWK6dJI8CJAl66WAFbx9G/9L2Pt80aDGOyp59bpRS1wct7qyhzT06Ef 05TnODwJKy2T4M77E0QLOCSYjpVEr8In0/uRgeyCmJPaDczF1QGEPBH+ZNJ42+26OYTq d9c0IKgbMIYyGPF9uJ5P2tr9++Pf8nIMLJfdDmnRYWhAL2eBNpr+t0GRIlS4Lr4L8E28 tIpw== X-Gm-Message-State: AOUpUlFDqzDL7MhYvIs+I5Rr5GTvJlinl0Giep3/goFuqLI6oKmwxXBj hfmSjt5fKOGwiMYGjlmVy0A= X-Received: by 2002:a65:428b:: with SMTP id j11-v6mr15298865pgp.200.1532942713454; Mon, 30 Jul 2018 02:25:13 -0700 (PDT) Received: from localhost.localdomain ([2402:f000:1:4414:4550:ab75:cee3:d6c1]) by smtp.gmail.com with ESMTPSA id d9-v6sm20096500pfb.86.2018.07.30.02.25.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jul 2018 02:25:13 -0700 (PDT) From: Jia-Ju Bai To: mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH 3/3] media: usb: em28xx: Replace GFP_ATOMIC with GFP_KERNEL in em28xx_init_usb_xfer() Date: Mon, 30 Jul 2018 17:25:07 +0800 Message-Id: <20180730092507.7902-1-baijiaju1990@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org em28xx_init_usb_xfer() is never called in atomic context. It calls usb_submit_urb() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai --- drivers/media/usb/em28xx/em28xx-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c index 36d341fb65dd..4a2ba6132a90 100644 --- a/drivers/media/usb/em28xx/em28xx-core.c +++ b/drivers/media/usb/em28xx/em28xx-core.c @@ -1053,7 +1053,7 @@ int em28xx_init_usb_xfer(struct em28xx *dev, enum em28xx_mode mode, /* submit urbs and enables IRQ */ for (i = 0; i < usb_bufs->num_bufs; i++) { - rc = usb_submit_urb(usb_bufs->urb[i], GFP_ATOMIC); + rc = usb_submit_urb(usb_bufs->urb[i], GFP_KERNEL); if (rc) { dev_err(&dev->intf->dev, "submit of urb %i failed (error=%i)\n", i, rc); -- 2.17.0