[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 1/7] xen/dt: of_property_read_string return -ENODATA when !length


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 3 May 2022 10:34:41 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=a3vWs1doxMo9fgyOrrbLJqWRH16n928hwX3XuATQuu8=; b=b2ndCx4TRvggiR+8+IPAK0iyuTNdkzMEsjUkQ7wMs7svggR9uhMhQvlnKTMT8tyrVAssUfC0KKhMQS1XeC49vF/y7sSYAQZfE3mq9WTUXGmHr8hc34VYPJF7b3lH8CizKdg3oxK4K2Ab1vjfk9Lt+MefKlzs6zdm5KbKUDOecYwDjN4+OBf9nGL256j7TgYCR99CBUToH4PBLoirxqldv9VihQjWZCtBNVvldFt7YaxOW58K2l35yAlug7jGl3ajdGqChJW07VRXyDGAnM1AhwPoVMCqqOECxQObQm8UjgCxWuO9OqNOpR2W86D2OBZDTplMf848tEXdybJQhUmxGg==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=a3vWs1doxMo9fgyOrrbLJqWRH16n928hwX3XuATQuu8=; b=daqxst6AdPsDryIV/mJnGkFmXnpx9T2leAXfshLLJIp/W3GMTP/W1OYe0tYlLjIQBdEp7tLz6znCy7j00p+vsMK4hFcaLQ9yGsVFtymmJFDcwxh5mr4EXuvNK/9OBc0/UawRMAXmvXQJrte4zRcoDLrqW4fa2pf6/gYj2X10E+Gnp7Kojwg/kaAn/U+4LG4yfwUnuJ7yPFPs1DT/kKC+YNZo4TN8VGKm1/HBgpDRK3cnRL7TatpS8NBhjxJOM7RcmNAThfIcPTRfmsQRBuvhtCk7ydIJAbH7U3819lu+BWxkVpgt4kSHxGd5osxNFCgLr5oYcx40YQvFZ3cnEsTLHQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=hbuhjdpFRYRD9+ktCNV4mVV68+WGYsD9imWKhM7fa5NfHR0mAKCDP4KsXGq4r8A6qadielIO+aPZMTjpxVH9fTsKGMe2xOh9/1CybNhEnS4TCgQGSlYURrf+JCcQXFJg5RwnSlFwXr9F/sOVwLQJs+jWtJjsTbn6J/8jDiGR0JT2+mbOSTo6iyKynyxm1lPNM4Dj6CYfpDzvvf8f1N5hPJnV5OKR49RJJ4X46U8Sortn7DYxO4iO9kY0+PHcwth9W3G9iaIoqylURQ391BnGRs+YrR47qNkXxV6xkko41KR9aBQ8pSY0BEbxY9LoLsXlKsSNKpgZ47nu3D5R/jEgmw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OK27lGfaigEUGPHkgxlz3Wiz7BY0vTeWJeBjo4wXlIAJdtzdgMe8bzI+mxMS8jDKhRSR6aSZpw43G8EaGGvfumJq/z+xpRqURTSzlbdZonw/Q+EaJpViHXe/gj8m+/Nn88oafDPLDpUu7Vy49b8mriMoHgJ8kQwjMqRADj4I/WcRLpnNrt2cqlQo8GE0RpjiVP3RYn0cE+AVqYfVV9jR7bRQFXyBN5WicKFMQYj3PjCp98GEKtmyT9bAh+JjD1k0YeFXy6BY2i9+1MObe1RZIqc5P0A0kGv2Rj287T04OvQL+TUxOuLOFQmu1Sdep9SKu9lbH4UmHWF1HDsm6ZN60g==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
  • Delivery-date: Tue, 03 May 2022 10:35:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYXAvKXCj8tnIY3E2+4y7aOufq8a0M+rIA
  • Thread-topic: [PATCH v5 1/7] xen/dt: of_property_read_string return -ENODATA when !length

Hi Stefano,

> On 29 Apr 2022, at 21:57, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> 
> When the length of the string is zero of_property_read_string should
> return -ENODATA according to the description of the function.
> 
> However, of_property_read_string doesn't check prop->length. If
> prop->length is zero, return -ENODATA.
> 
> Without this patch the following command in u-boot:
> 
> fdt set /chosen/node property-name
> 
> results in of_property_read_string returning -EILSEQ when attempting to
> read property-name. With this patch, it returns -ENODATA as expected.
> 
> This commit is a backport of:
> https://lore.kernel.org/xen-devel/20220416003028.1315268-1-sstabellini@xxxxxxxxxx/
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.