Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13373531ybl; Sun, 29 Dec 2019 10:20:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzyWJIqh10tq4p6WbVwy4jTO3h4sNs0oNWaCoz9mrTxVb1E+Am0M8DUBh+xT0mat07hiVAE X-Received: by 2002:a05:6830:194:: with SMTP id q20mr72300612ota.92.1577643610694; Sun, 29 Dec 2019 10:20:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577643610; cv=none; d=google.com; s=arc-20160816; b=A/a69gCTZjfr4HACcpNWMOITfbY1CGgrNA+G62a3u6825ejUkvlrJQWFMNFCfuXi0a OU4Lbs+fChoJIw4I51ekwpp6Epw0/WlOKXatDQJwTBKoWLEVaxXwUOqriHCUcRsQ4yui wnme+zecFvFk05b4BIbk5GwV40PkX+ScVfyqAdBX+X5nv3g8vqH9xjmc5vh/oPb6mpqP X2cjiC+scJ5zg7KyFhuCB2y9Ok3gKxPoG2q/Dp7jI349mtY7MxG2QAa/0g9ejvr4FBqD yC14Pjf4OuoZLxxX7YVMMT09+tpAb0z5RsfjWr6aR6P0SsCW20/dS9Rjf0cQcjowLtxW wURQ== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yBUS2WqJMhFioMwaDdug3gnQ/8IjoXX8Xxu3HJHNCYI=; b=tU5JS6Ip45K9J5s864Vs67/jVlsJDXOt2GoeoH9JiZQStFANxYg9HAx9xCKs8mLz62 SddaQV8usBYBUS/T6xpZXoJRsOJF2uxjtM6sfSSa+4adDJOSd4v/V03Pfh+ur4lfw7SW 1pZuxnnxLotKlZ1EYczI1//4sL0ThoYjvg77xkFwjLrZQfB+wWYRRdDf05cv65gVYeBw vksA7yvX/Z1RykNSRXnJRBa4yW+UvNh3LBc1c3JdZggi0O7JhPLsFvX3YC7oEm1C7g6o jxSXbs2By/NfG/7cMscz13301kvDBCpFee0EqEr8zH8ngyk5ZhCwhScYS4VlVB8gibCD vTIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o27vU7U9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n203si19555477oia.112.2019.12.29.10.19.58; Sun, 29 Dec 2019 10:20:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o27vU7U9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387863AbfL2SSF (ORCPT + 99 others); Sun, 29 Dec 2019 13:18:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:38250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727159AbfL2RWK (ORCPT ); Sun, 29 Dec 2019 12:22:10 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 19EE6222D9; Sun, 29 Dec 2019 17:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640129; bh=10Bch39nQdG2FDKAX+xNLwifrBrfE1LyaeBkCA4N98E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o27vU7U9GL5ZlNzwFa7ATH89AuwX+9LEENfpJyYqQdYl3zPJLTks5NywzPoSSJ6Ah wzbJ7UYOWglrJ7Og1a42BWZphlRcssVe5ml3n3e6KqI6UfrV96C0KGhl4t+pt8zem8 gwbEzeCEVyPKxJgPol0rljusg4MHhOQQlL7CtPxk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrew Lunn , Russell King , Florian Fainelli , "David S. Miller" Subject: [PATCH 4.14 003/161] mod_devicetable: fix PHY module format Date: Sun, 29 Dec 2019 18:17:31 +0100 Message-Id: <20191229162356.570646860@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162355.500086350@linuxfoundation.org> References: <20191229162355.500086350@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Russell King [ Upstream commit d2ed49cf6c13e379c5819aa5ac20e1f9674ebc89 ] When a PHY is probed, if the top bit is set, we end up requesting a module with the string "mdio:-10101110000000100101000101010001" - the top bit is printed to a signed -1 value. This leads to the module not being loaded. Fix the module format string and the macro generating the values for it to ensure that we only print unsigned types and the top bit is always 0/1. We correctly end up with "mdio:10101110000000100101000101010001". Fixes: 8626d3b43280 ("phylib: Support phy module autoloading") Reviewed-by: Andrew Lunn Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- include/linux/mod_devicetable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -519,9 +519,9 @@ struct platform_device_id { #define MDIO_NAME_SIZE 32 #define MDIO_MODULE_PREFIX "mdio:" -#define MDIO_ID_FMT "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" +#define MDIO_ID_FMT "%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u" #define MDIO_ID_ARGS(_id) \ - (_id)>>31, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \ + ((_id)>>31) & 1, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \ ((_id)>>27) & 1, ((_id)>>26) & 1, ((_id)>>25) & 1, ((_id)>>24) & 1, \ ((_id)>>23) & 1, ((_id)>>22) & 1, ((_id)>>21) & 1, ((_id)>>20) & 1, \ ((_id)>>19) & 1, ((_id)>>18) & 1, ((_id)>>17) & 1, ((_id)>>16) & 1, \