Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1359469pxb; Sun, 21 Feb 2021 22:48:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNBgLcxUQ9fYimymh/3SpnClWrB33uJmln2+fDGdzcrq4IfTESkoUcRAhd5qkGFZSPNECo X-Received: by 2002:a50:d307:: with SMTP id g7mr21111328edh.204.1613976536550; Sun, 21 Feb 2021 22:48:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613976536; cv=none; d=google.com; s=arc-20160816; b=aiMehBbTNsdI45Ald2UGhao6hzyQH1TAKAxeTU/d23EQhJRNpeQmtR7zV5WYsnEuhr 6nQQWAW92x8938+br3zFlZNR1Ml9CK/FscZgMrZ96JlDrOGcrtwfWa4Y3aueidji+jTB VlOz5CiyEgA8N83bGWLLcZcxGui3G/DbeVh52Rn9Tyo2haYOdMf1B4xydlIvfokdHePM 0oPE8GxRBXTDMI1TGGBATbxaltFMaHPRkVz67G05QYQ26n2FsZ5XkI5s9GXsebAWvtS0 +UvoQv7ylYoixsG7xtnW66LnGza79VLE1BipCBtEI7Ab8VWeNttTg3ByjNv06eU/4tfA w55A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=HYYenQ2WAlFKTYEo/giAKHRWQHtm6XuR1Z99Csmg/oM=; b=REw9cHPu7hCTZrxpR2yYYYrp4+IoUsFaSQNRJ9xI8VQXSUiIbPDhChQgkJDbwQOVpe 2YdA0V9N1pd4f6bezWNsuL1JQAHY5DWQrbK9MezQHUyxqOaT7D5k9NAL+7JiKdQCGgC7 3svyU6TLZb2+S+Q8Rgf8wWkLrrKFGi6cstQKIH0LwF3eOcORe9S/LFsMkBz3fLgKV21u CFDI6a4MsKRfFFQ8dWOUyy5By1ZoYfsTgX3LWkDx1ZWI1mxSoFXqxBO10l7T7e2+1lBX y9xkMTPYqE6maJazzvoLsbz2ZCw9jPOnVitPSNnXH9EW5/AVMJF+kA2pj/zis7gHYPzD /D0g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb43si9658863ejc.169.2021.02.21.22.48.34; Sun, 21 Feb 2021 22:48:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229983AbhBVGr6 (ORCPT + 99 others); Mon, 22 Feb 2021 01:47:58 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:58705 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229913AbhBVGr4 (ORCPT ); Mon, 22 Feb 2021 01:47:56 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R741e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0UPBjxZ._1613976431; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UPBjxZ._1613976431) by smtp.aliyun-inc.com(127.0.0.1); Mon, 22 Feb 2021 14:47:11 +0800 From: Yang Li To: martin.petersen@oracle.com Cc: mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, jejb@linux.ibm.com, tyreld@linux.ibm.com, linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] scsi: ibmvfc: Switch to using the new API kobj_to_dev() Date: Mon, 22 Feb 2021 14:47:09 +0800 Message-Id: <1613976429-89853-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fixed the following coccicheck: ./drivers/scsi/ibmvscsi/ibmvfc.c:3161:60-61: WARNING opportunity for kobj_to_dev() Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 65f168c..e947149 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -3158,7 +3158,7 @@ static ssize_t ibmvfc_read_trace(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct Scsi_Host *shost = class_to_shost(dev); struct ibmvfc_host *vhost = shost_priv(shost); unsigned long flags = 0; -- 1.8.3.1