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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id CC052C433F5 for ; Fri, 21 Jan 2022 07:51:37 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nAohR-0005Ac-Qo; Fri, 21 Jan 2022 02:51:09 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nAohP-0005A3-HY for kernelnewbies@kernelnewbies.org; Fri, 21 Jan 2022 02:51:07 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BC32A5C00E1; Fri, 21 Jan 2022 02:51:04 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 21 Jan 2022 02:51:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=B37vKOdd9fYzXZMv/HhxtMhXrpIQFlfxeOJqbj khJEQ=; b=Hb2n06ksjBqp1rpUZIP21UXrKRLc6q+OaaaLuokHp9PJFe79UAc+zy f59CfARkl/xp+Xrgq2SZ+PFFZLv1SeATl6ySpi2LYyD8g6fRbP5yWgn/iARWaC+E Hm3BaVdznVLhQ/RUKN8s8XYrlnb1XatHk/b+zcyEuKsNrjQm5uwRh9K6AlhYUEwc 94AR6YgqaX4lagbw/MclkcHbfN/XveLWYN0AWmtEHwFK+75cdAP5uxlh9yhd5kV8 AZwgSfcR6AVyufJZHBo6me0GJ0wu6NND9LLl7fKxHg76pb8xgmdpDq3o8eAGVQOr hmRAEzv7gNg5DVEwQOd/ZC5+bZIjl34g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=B37vKOdd9fYzXZMv/ HhxtMhXrpIQFlfxeOJqbjkhJEQ=; b=MuRwj4PQcZQ3t9OWkF6jAunOg0AVe/ob0 ssuyLS0wPsxPL049m27pU/sOAhtRVekMlhxhToq0IbC9vgNs1j2mlv+Ed0LmpO2q uap3AoKMSVZm6iUgNDzARCkDofuzehfZTFts1BxbMac1rHFKDTWZYGX2csuviYCa z0TqjlMMLb9hN5/sy94l/EjDZnAxxAhtLs8pOkkTp9ricJoZy9AP69D0LNS2u21e R0wuAP6nL8hjb5IZ8t1VrcSsYsabbEdOiZ6mglNbyr4Dt2Sd/7cl5meIpuNDdg6Y zALCxBPdAyoXscYVHjXRwh19i+YXUZ3qbkp37ulFUwe383mjdPKSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudelgdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevueehje fgfffgiedvudekvdektdelleelgefhleejieeugeegveeuuddukedvteenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh drtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 21 Jan 2022 02:51:04 -0500 (EST) Date: Fri, 21 Jan 2022 08:51:01 +0100 From: Greg KH To: Tianrui Wei Subject: Re: How to Convert Legacy Kernel Modules for modern Kernels Message-ID: References: <77D00D9A-F4E5-429F-BD91-729EE2847482@tianruiwei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <77D00D9A-F4E5-429F-BD91-729EE2847482@tianruiwei.com> Cc: 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 On Thu, Jan 20, 2022 at 06:10:31PM +0800, Tianrui Wei wrote: > Hi, > > I was wondering if there're any tools/scripts in Linux that'd help me > to convert legacy kernel modules for using on a modern Linux (Kernel > > 5.0) system? It depends on the driver you wish to convert. For wireless drivers, there was the "linux backport project" that provided scripts and tools to do this type of work. For other subsystems, I do not think anyone ever did so as it's both not that hard, and also very specific to the code that you are trying to convert. > If there're not out of box solutions, is there a way I could view the > API changes in every subsystem clearly? For example, this particular > commit[^1] shows the second return argument is being removed from > ki_complete, and it took a lot of fishing down the lkml to do. Perhaps > there is a simpler way? Use git itself to track the changes in apis. You can see all changes to a .h file by doing: git log -p path/to/file and then see where the api got changed. It usually isn't that difficult to forward port a driver, but it all depends on the age of the code, and what it actually does. Do you have a link to the code you wish to drag forward? You can also always add it to the in-kernel drivers/staging/ area and have others help out with this effort. good luck! greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies