Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2657857ybx; Sun, 3 Nov 2019 01:01:40 -0800 (PST) X-Google-Smtp-Source: APXvYqyKTSHmr9MbQpGJr9wai8LmZE66oNi2SLRpBJ2el+J/eiknXqxk/nkCj+bVqESYxOmnF0up X-Received: by 2002:a17:906:c9d8:: with SMTP id hk24mr10561450ejb.159.1572771700362; Sun, 03 Nov 2019 01:01:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572771700; cv=none; d=google.com; s=arc-20160816; b=pluqOOu6egD3V7I9Gb9loJDPtr4xi7DJyhQ6jQNljr20K0rU8C4WRXLu8FHKJmVHYH yyGk9M4vVdb8PAEZzYGNsnJlkoQldbIAk8pl4cKfeNgHntlk6aHwZZjly+1kBSsojIvp jkYWLTi8jikeBSwtf1UDrtYehsdOTipEgV33gMYtD/mQtCH73H8XQI+xVRYpfSfILd9V +5E+IuHcvl8T5kGPeQicppuTXpUlZCJCsRGeogmBEtq/Bngim0IONIC/dPmzCMwg0klx M8EYny1GfuEqw8JQu0oO7Kaqx3/1raD/vOM2TJoOX1NMiIbuVMaRKQPytvdYbtMCx0eW e+Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=ASIFX1OQDZGKIrOUSXfcr5nLRrqkdxWZqZbzI0p1c4c=; b=VorjD0SQluJHI2oObkux7vHLsLp8MCeTdtNkpXF/m22G1hXbrJfCIiv4CFTo1IQtxh 0DL8H8wncMSeov3OXEUknAfUbWoiqItgQBVin1Bka4pP/rEcsh8JDYxRSw9VFsj3N11H eWSfGh8rz53IB0rjVRnbxAcUCO5kmOy30cfVE6BvybCtpoXUtK4Un+aTbIoQBX0h1G8Z IH427G7xIWpi+/8P3cr1AB+rXICwsEVu1Ps2sARgIMXqLNYnJSWCkOgf3y0uvjorJYjX UdPyoBsPAp2F6RbUIN9c7HvvLgiZispt0L9hLOaS66kwMncgv9Jkg/AEafM/mMJKpd9D Atyw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c49si5030462edc.361.2019.11.03.01.00.46; Sun, 03 Nov 2019 01:01:40 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727380AbfKCI7t (ORCPT + 99 others); Sun, 3 Nov 2019 03:59:49 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:39017 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726408AbfKCI7t (ORCPT ); Sun, 3 Nov 2019 03:59:49 -0500 X-IronPort-AV: E=Sophos;i="5.68,262,1569276000"; d="scan'208";a="410041714" Received: from abo-45-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.45]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Nov 2019 09:59:47 +0100 Date: Sun, 3 Nov 2019 09:59:47 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Can Guo cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org, Venkat Gopalakrishnan , Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Tomas Winkler , Subhash Jadavani , open list , kbuild-all@lists.01.org Subject: [PATCH] scsi: ufs: fix call_kern.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot Function ufshcd_dump_regs called from ufshcd_intr inside a lock but uses GFP_KERNEL. Generated by: scripts/coccinelle/locks/call_kern.cocci Fixes: 3393ec7d5dc1 ("scsi: ufs: Fix irq return code") CC: Venkat Gopalakrishnan Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- url: https://github.com/0day-ci/linux/commits/Can-Guo/UFS-driver-general-fixes-bundle-3/20191103-092121 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next :::::: branch date: 2 hours ago :::::: commit date: 2 hours ago Another approach would be to reorganize the code to not use this function in printing the error message from the interrupt handler, or to reorganize the code in some other way. ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -117,7 +117,7 @@ int ufshcd_dump_regs(struct ufs_hba *hba if (offset % 4 != 0 || len % 4 != 0) /* keep readl happy */ return -EINVAL; - regs = kzalloc(len, GFP_KERNEL); + regs = kzalloc(len, GFP_ATOMIC); if (!regs) return -ENOMEM;