Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1710531pxf; Fri, 12 Mar 2021 17:38:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbal67UM3io/5Ve0gnLwmrz7UNhfzhpq6H0LHrlgpmOjQRdeMLmycuy+j8EadR+YEc0aIO X-Received: by 2002:a17:906:8a6e:: with SMTP id hy14mr11921734ejc.356.1615599517610; Fri, 12 Mar 2021 17:38:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615599517; cv=none; d=google.com; s=arc-20160816; b=XwRh0Asumy/rfiBkTaByDnSuDTKUsw0P6swqPCyucnokKRFXNIxE48jHF53UVC/21i ihCVrClIOpPxVN7Md7CCpwggITdepaH3LLmFu4cGr55QMmQ5H+AQzFaYX6nBZP2suw3K qJr82iehWOrPSMvztLzqMCkOtyEAjDkNyRHfQUCO3Ay7uJiKKwISqHOgsUtatnpSfIuG WUEUw22Xm2nPxNwUVdCLgPjdSEytIPEue97D6zOI00TKMEENkyd9hlsbpIBSanXMtVc/ mLV4eDSnOmvA/SXq/dfbrm67greIxX2J+8rhJU6AOcW++xT9gGPYuOzmFsoLt2+uY8U5 tJlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=KhwZ7d+EJ3hHhcMJfmlv7IVXqyG8ZDcF2bxshR7Il5g=; b=DBfgqgyXCYw5eKpGlebHTqpm5EfKW8mZA4LB/IvTiSTYCcayTEEUkpseLQ5ayPGNHJ DlCmzc79NXZBAEg5mciRkvXBxti7Jn4zclwqaQZ1QqOm3j6UvYgqs4TKQu80XuPlWoua 9CKf1rNqB5CJVMJCKL9TRZphaG5v5WsLbMhptZ1g+Wz2NM1o94QNT+DhrW44BR4T4BRH /c/S9P9+k57LdfHxltln3mZ1PhCnGNeDNedJ+V8EBDdrneF+O9qbABtFozKrr58d3RxS yJnUFr1qeOJfryWO20HmCSFO+j415fKupkdfWbAYQlRaA28R4+A7a4LKOwukMNL6F/x3 H6aA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp18si5658444ejc.432.2021.03.12.17.37.42; Fri, 12 Mar 2021 17:38:37 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232229AbhCMBbW (ORCPT + 99 others); Fri, 12 Mar 2021 20:31:22 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:13507 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231679AbhCMBaz (ORCPT ); Fri, 12 Mar 2021 20:30:55 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Dy4pN09P2zjTPp; Sat, 13 Mar 2021 09:29:00 +0800 (CST) Received: from [10.67.102.118] (10.67.102.118) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Sat, 13 Mar 2021 09:30:43 +0800 Subject: Re: [PATCH v3 1/2] crypto: hisilicon/sec - fixes some log printing style To: Herbert Xu CC: , , , References: <1614838735-52668-1-git-send-email-liulongfang@huawei.com> <1614838735-52668-2-git-send-email-liulongfang@huawei.com> <20210312125918.GA12149@gondor.apana.org.au> From: liulongfang Message-ID: <14684f5f-0223-7e33-3891-0f578648d422@huawei.com> Date: Sat, 13 Mar 2021 09:30:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20210312125918.GA12149@gondor.apana.org.au> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.118] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/3/12 20:59, Herbert Xu wrote: > On Thu, Mar 04, 2021 at 02:18:54PM +0800, Longfang Liu wrote: >> >> @@ -727,7 +725,7 @@ static void sec_cipher_pbuf_unmap(struct sec_ctx *ctx, struct sec_req *req, >> struct aead_request *aead_req = req->aead_req.aead_req; >> struct sec_cipher_req *c_req = &req->c_req; >> struct sec_qp_ctx *qp_ctx = req->qp_ctx; >> - struct device *dev = SEC_CTX_DEV(ctx); >> + struct device *dev = ctx->dev; >> int copy_size, pbuf_length; >> int req_id = req->req_id; >> >> @@ -737,11 +735,9 @@ static void sec_cipher_pbuf_unmap(struct sec_ctx *ctx, struct sec_req *req, >> copy_size = c_req->c_len; >> >> pbuf_length = sg_copy_from_buffer(dst, sg_nents(dst), >> - qp_ctx->res[req_id].pbuf, >> - copy_size); >> - >> + qp_ctx->res[req_id].pbuf, copy_size); >> if (unlikely(pbuf_length != copy_size)) >> - dev_err(dev, "copy pbuf data to dst error!\n"); >> + dev_err(ctx->dev, "copy pbuf data to dst error!\n"); >> } > > This triggers an unused warning on dev. Please fix. > > Thanks, > Ok! I will check if this problem exists elsewhere. Thanks, Longfang