Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp582625ybh; Sat, 18 Jul 2020 13:26:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnPtebWYUWvrO4o7I1bI5UlWSYya5fI2shIlLQ4NUAHjRQlxIe7dg/yx2lnKMQpPF5nAfC X-Received: by 2002:a17:906:e91:: with SMTP id p17mr12279749ejf.252.1595104003010; Sat, 18 Jul 2020 13:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595104003; cv=none; d=google.com; s=arc-20160816; b=HUQtjpG0AqaMNg+gHgoOp0ncycP2ZgNdwqscSzPwiD3+BBpG2IRP2RYSVii2e9kgFy NtW+g1WViEqohJTx/my/MKm4bKvRSK/tKdnmOlWLPEooSyLWS6M/Z4RgEWWrtI/z8fPO wm7zWyBVlfXPpM19DnNmkLzqHjaaJozRmb9R6HA0NRWVldiDNsnXZZOxewAYc508g/bO 8QHvzaaLi4fpp28dqmsC+ZHPM2T834RmBC/NJ11D23dGGEBsRl3MgDphpByOKzKSPAyB S656GdXn78/AbkW0Jg826mG5AmgG9VIxkHRq/2gz646b1zCMnMqtDWUp/cEb84jiOll1 DLRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=mgFAz3AhMPggh8gTyoyGEbJWp9KY0vdf8a981yFIJ6k=; b=rYyxh9PFCdSnGISFSEl5ydY1RTPxtrnVolmUHGE+P0qXW9JJWrPN/oIYJNKg85hDX2 /6+FU/pq+hnetTPmMAblbOeUa93aUiBE4Xfs37WHgiE65hnbj7yzLKOa6/RkJKnrjGhH FqcCuSjtytfbd7hiBQZfmYX4COUnKGykcxRmIPmcmeGViSGy8VbTrKL8wj8w8jBB1ofh C/bumlpI415/UvLNt3iwipECu9hSf4Kacc146s4oOysiJTjOVQrMjT5HkQn8TzLGt7uT hJLlvhX9ebjeCCn4uHp/WgkVfGxedG2PZNVGmDetkqA7uq1qsrm6eOjncxtRilfF2Eca jGlA== 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 m8si7956363edv.543.2020.07.18.13.26.19; Sat, 18 Jul 2020 13:26:42 -0700 (PDT) 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 S1727951AbgGRUZ7 (ORCPT + 99 others); Sat, 18 Jul 2020 16:25:59 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:44257 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726916AbgGRUZ6 (ORCPT ); Sat, 18 Jul 2020 16:25:58 -0400 Received: by mail-pg1-f193.google.com with SMTP id j19so8332316pgm.11; Sat, 18 Jul 2020 13:25:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=mgFAz3AhMPggh8gTyoyGEbJWp9KY0vdf8a981yFIJ6k=; b=UI5BaOvF5S3bsKNDOjtoukPK4hfRlDvTsW0eVMk631YST6BnlRgbP/q7jEdrUdfM0J 9OpFnrr9AMnoatugPSEoBiSQfRrIgQgdfyRSfkmiS20dTz47jpczD49FQYgp+lKUUxaO A0vN/YMIOWojXIU69sXzeXlm67JezPz9keapOScogW7znUzTQo9xJSHusq98XxNDJ63t 1aCneEfRYcG8933uA4u61i975F9xS1LPEAHPQSItLpbV43c17erAqIhlDjBZrizOC/ZK Z60vxGIR+Kw4bzegUoMoQXgUAecmn7X3es7P2g2Btoo8kJRXrdXxPFvpSUuYhlIffQzO MJAQ== X-Gm-Message-State: AOAM530qzXeP9MXIvXopQGbH7LGBU5PLM6pY3/vqx9EFTLYD5IbifMNu DRvqWM7T2qyH4HOfKDUl/oA= X-Received: by 2002:a63:7054:: with SMTP id a20mr13087288pgn.17.1595103957944; Sat, 18 Jul 2020 13:25:57 -0700 (PDT) Received: from [192.168.50.147] (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id lw5sm6516373pjb.37.2020.07.18.13.25.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Jul 2020 13:25:57 -0700 (PDT) Subject: Re: [PATCH v2] scsi: scsi_transport_sas: add missing newline when printing 'enable' by sysfs To: Xiongfeng Wang , jejb@linux.ibm.com, martin.petersen@oracle.com, john.garry@huawei.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, guohanjun@huawei.com References: <1594975472-12486-1-git-send-email-wangxiongfeng2@huawei.com> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sIs2Y2D3Lg/SL7qqbMehGEYcJptu6mKkywBfoYbtBkVoJ/jQsi2H0vBiiCOy fmxMHIPcYxaJdXxrOG2UO4B60Y/BzE6OrPDT44w4cZA9DH5xialliWU447Bts8TJNa3lZKS1 AvW1ZklbvJfAJJAwzDih35LxU2fcWbmhPa7EO2DCv/LM1B10GBB/oQB5kvlq4aA2PSIWkqz4 3SI5kCPSsygD6wKnbRsvNn2mIACva6VHdm62A7xel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AUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: <88b08a41-55b2-ae5d-fbe5-24439429855f@acm.org> Date: Sat, 18 Jul 2020 13:25:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1594975472-12486-1-git-send-email-wangxiongfeng2@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-07-17 01:44, Xiongfeng Wang wrote: > diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c > index 182fd25..e443dee 100644 > --- a/drivers/scsi/scsi_transport_sas.c > +++ b/drivers/scsi/scsi_transport_sas.c > @@ -563,7 +563,7 @@ static ssize_t do_sas_phy_enable(struct device *dev, > { > struct sas_phy *phy = transport_class_to_phy(dev); > > - return snprintf(buf, 20, "%d", phy->enabled); > + return snprintf(buf, 20, "%d\n", phy->enabled); > } For future sysfs show function patches, please use PAGE_SIZE as second snprintf() argument or use sprintf() instead of snprintf() because in this case it is clear that no output buffer overflow will happen. Using any other size argument than PAGE_SIZE makes patches like the above harder to verify than necessary. Anyway: Reviewed-by: Bart van Assche