lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7628b89847adda7d8302db91d48b3ff62245f43.camel@mediatek.com>
Date:   Mon, 27 Feb 2023 12:11:51 +0000
From:   Yanchao Yang (杨彦超) 
        <Yanchao.Yang@...iatek.com>
To:     "kuba@...nel.org" <kuba@...nel.org>
CC:     Chris Feng (冯保林) 
        <Chris.Feng@...iatek.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        Mingliang Xu (徐明亮) 
        <mingliang.xu@...iatek.com>,
        Min Dong (董敏) <min.dong@...iatek.com>,
        "linuxwwan@...el.com" <linuxwwan@...el.com>,
        "m.chetan.kumar@...el.com" <m.chetan.kumar@...el.com>,
        Liang Lu (吕亮) <liang.lu@...iatek.com>,
        Haijun Liu (刘海军) 
        <haijun.liu@...iatek.com>,
        Haozhe Chang (常浩哲) 
        <Haozhe.Chang@...iatek.com>,
        Hua Yang (杨华) <Hua.Yang@...iatek.com>,
        "ryazanov.s.a@...il.com" <ryazanov.s.a@...il.com>,
        Xiayu Zhang (张夏宇) 
        <Xiayu.Zhang@...iatek.com>,
        "loic.poulain@...aro.org" <loic.poulain@...aro.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        Ting Wang (王挺) <ting.wang@...iatek.com>,
        "johannes@...solutions.net" <johannes@...solutions.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Aiden Wang (王咏麒) 
        <Aiden.Wang@...iatek.com>,
        Felix Chen (陈非) <Felix.Chen@...iatek.com>,
        Lambert Wang (王伟) 
        <Lambert.Wang@...iatek.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        Mingchuang Qiao (乔明闯) 
        <Mingchuang.Qiao@...iatek.com>,
        Guohao Zhang (张国豪) 
        <Guohao.Zhang@...iatek.com>
Subject: Re: [PATCH net-next v3 01/10] net: wwan: tmi: Add PCIe core

On Fri, 2023-02-24 at 11:50 -0800, Jakub Kicinski wrote:
> On Fri, 24 Feb 2023 07:39:33 +0000 Yanchao Yang (杨彦超) wrote:
> > > > Do you really need these flags?  
> > > 
> > > We will check and update if it's really redundant soon.  
> > 
> > Update test result.
> > Both flags are deleted, then run the make command with 
> > "build in" and "build module" on a separate kernel tree. Both
> > suffer
> > the same build error.
> > “drivers/net/wan/mediatek/pcie/mtk_pci.c:16:10: fatal error:
> > mtk_fsm.h:
> > No such file or directory
> >  #include "mtk_fsm.h""
> > The reason is that all files are not placed in the same folder. The
> > driver named TMI needs a child folder, then needs these flags.
> > 
> > Any ideas or comments for this? Please help share it at your
> > convenience.
> 
> Relative paths work, right?
> 
Okay. Change as follows, is that right?
mtk_pci.h includes "mtk_dev.h",
which is located in the parent folder.
#include "../mtk_dev.h"

mtk_fsm.c
includes "mtk_reg.h", which is located in the child folder "pcie"
#inclu
de "pcie/mtk_reg.h"

> > > > Labels should be named after action they perform, not where
> > > > they
> > > > jump
> > > > from. Please fix this everywhere.  
> > > 
> > > We can found similar samples in kernel codes, naming the label
> > > per
> > > where jump from…
> > > ex. pci-sysfs.c
> > > shall we apply this rule to our driver?
> > > I
> > > t's mandatory or nice to have.  
> > 
> > Any ideas or comments for this? Please help share it at your
> > convenience.
> 
> It's mandatory for new code.
Okay. Change as follows, is that right?
	......
	Ret =
mtk_ctrl_init(mdev);
	If (ret)
		goto free_fsm;
	ret = mtk_data_init(mdev)

	If (ret)
		goto free_ctrl_plane;
	return 0;
free_ctrl_plane:

	mtk_ctrl_exit(mdev);
free_fsm:
	mtk_fsm_exit(mdev);
exit:
	return ret;
}

many thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ