From patchwork Sun Mar 10 14:07:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tangwenji X-Patchwork-Id: 10846311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25E051575 for ; Sun, 10 Mar 2019 14:08:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04028289F6 for ; Sun, 10 Mar 2019 14:08:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E836D28FDD; Sun, 10 Mar 2019 14:08:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76C4F289F6 for ; Sun, 10 Mar 2019 14:08:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726568AbfCJOH7 (ORCPT ); Sun, 10 Mar 2019 10:07:59 -0400 Received: from m12-16.163.com ([220.181.12.16]:39158 "EHLO m12-16.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbfCJOH6 (ORCPT ); Sun, 10 Mar 2019 10:07:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=WmM41V8h2Uy2jt7G7J FJolZ5WENVASURlGJOTTh86QY=; b=KIrnshgiUWySaGOKpjZW0yi630zeObik+K CzGMHkjGs0TPWISI3M+veMt7xIf2cVU0FWWteCiNot5NKzAdGer+2NoWOgSUSb7Y I6OiuWGVsi72R26rAJIioSEyJmy+q4VE9Lne0jxSZCfEGgjw/76Wl4Jg1/7kMKoM sj+I1Rav4= Received: from localhost.localdomain (unknown [222.247.86.88]) by smtp12 (Coremail) with SMTP id EMCowABX+6gzGoVcyZZjAA--.12499S2; Sun, 10 Mar 2019 22:07:48 +0800 (CST) From: tangwenji To: "Martin K. Petersen" Cc: Mike Christie , target-devel@vger.kernel.org, tangwenji Subject: [PATCH] target:tcmu:add '\n' when return user space Date: Sun, 10 Mar 2019 22:07:53 +0800 Message-Id: <1552226873-3668-1-git-send-email-hndksztwj@163.com> X-Mailer: git-send-email 2.5.0.windows.1 X-CM-TRANSID: EMCowABX+6gzGoVcyZZjAA--.12499S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7GF1fuF4Dur48GFy5Zw1xAFb_yoWftFg_Cw sFqr13Ww1kuFy7KF1UCw4kJrZIyryrurn2vF10yayfKryDu3WkC34qyF1qyryDurZ5Zr9Y ywnxZrykuF4SqjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0NeOJUUUUU== X-Originating-IP: [222.247.86.88] X-CM-SenderInfo: 5kqgy2h2wzyqqrwthudrp/1tbiRRRzQ1l9pL-A4AAAs+ Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: tangwenji In function tcmu_get_global_max_data_area return string should include '\n'. Signed-off-by: tangwenji Acked-by: Mike Christie --- drivers/target/target_core_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 5831e0e..50229c1 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -244,7 +244,7 @@ static int tcmu_set_global_max_data_area(const char *str, static int tcmu_get_global_max_data_area(char *buffer, const struct kernel_param *kp) { - return sprintf(buffer, "%d", TCMU_BLOCKS_TO_MBS(tcmu_global_max_blocks)); + return sprintf(buffer, "%d\n", TCMU_BLOCKS_TO_MBS(tcmu_global_max_blocks)); } static const struct kernel_param_ops tcmu_global_max_data_area_op = {