From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7A30C433DB for ; Wed, 27 Jan 2021 16:21:36 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2B5620757 for ; Wed, 27 Jan 2021 16:21:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2B5620757 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1l4nZB-0007nU-Dj; Wed, 27 Jan 2021 11:21:13 -0500 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l4nZ9-0007m5-7q for kernelnewbies@kernelnewbies.org; Wed, 27 Jan 2021 11:21:11 -0500 Received: by mail-pj1-x102a.google.com with SMTP id e9so1671817pjj.0 for ; Wed, 27 Jan 2021 08:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oZSjNXDCtq3ENEpbN/fIvnLt9rgpjxecqRbUsqAYp2M=; b=R8iDRz+THf+ckCG+Gre2l3rncwDRoe8vzhWMOeOujBVFlVgzZFAlIPHGw3rP/Dz0BI DPtXhlgIVZnTMb1P+PSZxK6yMPWtHem1eBAVgO5jp6YLj9pFovfVGte4N69nsHlGQoVf ZHz3DEMRA41Y23SsdnBZR9NQB6hwO78q1QQJF1erUYIhCcrWEG2q98CESMpTU0XoMtEL nMVGBmW7NVBmWRHV/plGpL9cV55IOsXWGFYheP2YzEyNpZUJsy0Cer4AssSk8qry+A1O 7ZVd6ojhSmvt8FBmkL4V2T4s+N8M+OSnFhBnLyhod2TADRF1SPkqrbkdBpeAD2FEgy5R AoCg== 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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oZSjNXDCtq3ENEpbN/fIvnLt9rgpjxecqRbUsqAYp2M=; b=X50qkZbbyxiIhpWgos8EamRLG5mQLP9GKc+3YXtxbzA+YZTYQ+Skgg1nEro9l9MVrs Ptb3IRt+2MBQCBUc3pab6a9QdwFXOI/b3oWr5HlUMUGAGK/P1Wf35X4E+CiWX/VMGs3t FIsNqsC5If9E2Rq+hMWCguKsddEXXlI4n30OAjoaPGS2CtQParmIr5bRkoUoAKJ48O4A h7WwjDkX3vialhpJBLNib/lSfzu+BKdMbEtmxn5Sg2esgWSUi5VAsFFoQYypNKniUNkq wvtdkm7hj807Ro2/WolrvtOpcTHsKf1YgVgufpcd7Oz1wPBWHtY1OW97HCjjzi532LjT zwmg== X-Gm-Message-State: AOAM5329XR628N3VNhXy5sHwJ++6HLWTrPxWXuaOLtM2iMxEZ0Me+ip3 7qjTfo8OyraFGL8QsIhBpgY= X-Google-Smtp-Source: ABdhPJxQwkJE68aysYE1l8W3eeaws2ajdtlE6VxbwIn862/VPKOfZzjDmaOooMovk0/RoL1o0ZYdFQ== X-Received: by 2002:a17:902:d64d:b029:de:8aaa:d6ba with SMTP id y13-20020a170902d64db02900de8aaad6bamr12004682plh.0.1611764468260; Wed, 27 Jan 2021 08:21:08 -0800 (PST) Received: from [192.168.0.159] ([49.205.248.109]) by smtp.gmail.com with ESMTPSA id 77sm3081523pfz.100.2021.01.27.08.21.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Jan 2021 08:21:07 -0800 (PST) Subject: Re: Doubt on show() function of sysfs attribute To: Greg KH References: <98fe87f5-19ac-dfa7-41eb-2e00d7415021@gmail.com> From: Mohana Datta Yelugoti Message-ID: <9f0dde74-cb21-0bf8-2a20-0cd82cf0c505@gmail.com> Date: Wed, 27 Jan 2021 21:51:04 +0530 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: Content-Language: en-US Cc: lukas.bulwahn@gmail.com, kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org > > See the thousands of examples in the kernel of this if you need proof :) > True. I was actually confused because many kernel examples use sysfs_emit() and here in sysfs_emit(), the buffer is not completely filled. But, i got it now. I will experiment more and will see if i can send a patch updating sysfs.rst accordingly. Thank you. Cheers, ymdatta. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies