Re: [PATCHv6 3/5] Staging: most: hdm-usb/hdm_usb.c. Fix "missing static keyword" warnings
On Thu, Aug 06, 2015 at 11:57:28PM +0200, Christian Gromm wrote: > On Thu, 6 Aug 2015 19:34:58 +0200 > Adrian Remonda wrote: > > > This is a patch to the most/hdm-usb/hdm_usb.c file. It > > makes several local functions and structures static to prevent global > > visibility. > > > > v6: fixed alignment with parameter list of a function. > > > > Signed-off-by: Adrian Remonda > > --- > > drivers/staging/most/hdm-usb/hdm_usb.c | 16 > > 1 file changed, 8 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c > > b/drivers/staging/most/hdm-usb/hdm_usb.c > > index 514ce3529b7a..305303f2f17c 100644 > > --- a/drivers/staging/most/hdm-usb/hdm_usb.c > > +++ b/drivers/staging/most/hdm-usb/hdm_usb.c > > @@ -290,7 +290,7 @@ static unsigned int get_stream_frame_size(struct > > most_channel_config *cfg) > > * > > * Returns 0 on success or error code otherwise. > > */ > > -int hdm_poison_channel(struct most_interface *iface, int channel) > > +static int hdm_poison_channel(struct most_interface *iface, int channel) > > { > > struct most_dev *mdev; > > > > @@ -328,7 +328,7 @@ int hdm_poison_channel(struct most_interface *iface, > > int channel) > > * This inserts the INIC hardware specific padding bytes into a streaming > > * channel's buffer > > */ > > -int hdm_add_padding(struct most_dev *mdev, int channel, struct mbo *mbo) > > +static int hdm_add_padding(struct most_dev *mdev, int channel, struct mbo > > *mbo) > > { > > struct most_channel_config *conf = &mdev->conf[channel]; > > unsigned int j, num_frames, frame_size; > > @@ -365,7 +365,7 @@ int hdm_add_padding(struct most_dev *mdev, int channel, > > struct mbo *mbo) > > * This takes the INIC hardware specific padding bytes off a streaming > > * channel's buffer. > > */ > > -int hdm_remove_padding(struct most_dev *mdev, int channel, struct mbo *mbo) > > +static int hdm_remove_padding(struct most_dev *mdev, int channel, struct > > mbo *mbo) > > { > > unsigned int j, num_frames, frame_size; > > struct most_channel_config *const conf = &mdev->conf[channel]; > > @@ -644,7 +644,7 @@ static void hdm_read_completion(struct urb *urb) > > * > > * Context: Could in _some_ cases be interrupt! > > */ > > -int hdm_enqueue(struct most_interface *iface, int channel, struct mbo *mbo) > > +static int hdm_enqueue(struct most_interface *iface, int channel, struct > > mbo *mbo) > > { > > struct most_dev *mdev; > > struct buf_anchor *anchor; > > @@ -743,8 +743,8 @@ _error: > > * @channel: channel ID > > * @conf: structure that holds the configuration information > > */ > > -int hdm_configure_channel(struct most_interface *iface, int channel, > > - struct most_channel_config *conf) > > +static int hdm_configure_channel(struct most_interface *iface, int channel, > > +struct most_channel_config *conf) > > Again, please keep the original alignment and start the second line > of function arguments right beneath the first argument or else this > function will be different from others. > > Thanks, > Chris Hello Christian, Whith the patch applied on my tree this looks properly aligned. Could you double check? regards, Adrian > > > { > > unsigned int num_frames; > > unsigned int frame_size; > > @@ -824,7 +824,7 @@ exit: > > * This triggers the USB vendor requests to read the hardware address and > > * the current link status of the attached device. > > */ > > -int hdm_update_netinfo(struct most_dev *mdev) > > +static int hdm_update_netinfo(struct most_dev *mdev) > > { > > struct device *dev = &mdev->usb_device->dev; > > int i; > > @@ -873,7 +873,7 @@ int hdm_update_netinfo(struct most_dev *mdev) > > * polls for the NI state of the INIC every 2 seconds. > > * > > */ > > -void hdm_request_netinfo(struct most_interface *iface, int channel) > > +static void hdm_request_netinfo(struct most_interface *iface, int channel) > > { > > struct most_dev *mdev; > > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/31] staging/lustre: use kmemdup rather than duplicating its implementation
The patch was generated using fixed coccinelle semantic patch scripts/coccinelle/api/memdup.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 Signed-off-by: Andrzej Hajda --- drivers/staging/lustre/lustre/obdclass/acl.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/acl.c b/drivers/staging/lustre/lustre/obdclass/acl.c index bc3fc47..933456c 100644 --- a/drivers/staging/lustre/lustre/obdclass/acl.c +++ b/drivers/staging/lustre/lustre/obdclass/acl.c @@ -104,11 +104,10 @@ static int lustre_posix_acl_xattr_reduce_space(posix_acl_xattr_header **header, if (unlikely(old_count <= new_count)) return old_size; - new = kzalloc(new_size, GFP_NOFS); + new = kmemdup(*header, new_size, GFP_NOFS); if (unlikely(new == NULL)) return -ENOMEM; - memcpy(new, *header, new_size); kfree(*header); *header = new; return new_size; @@ -125,11 +124,10 @@ static int lustre_ext_acl_xattr_reduce_space(ext_acl_xattr_header **header, if (unlikely(old_count <= ext_count)) return 0; - new = kzalloc(ext_size, GFP_NOFS); + new = kmemdup(*header, ext_size, GFP_NOFS); if (unlikely(new == NULL)) return -ENOMEM; - memcpy(new, *header, ext_size); kfree(*header); *header = new; return 0; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8723au: Fix sparse warning: cast to restricted __le16
On 06/08/15 at 08:21am, Jes Sorensen wrote: > > Looks OK to me. Probably worth changing the *(usPtr + index) to be > usPtr[index] as well to make the code easier to read. > > Jes > Thank you for reviewing. I will make a seperate patch for that. I will send it after this one is accepted. Or should I combine them into a patch serie? Johannes ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCHv6 3/5] Staging: most: hdm-usb/hdm_usb.c. Fix "missing static keyword" warnings
On Fri, Aug 07, 2015 at 09:40:03AM +0200, AdrianRemonda wrote: > On Thu, Aug 06, 2015 at 11:57:28PM +0200, Christian Gromm wrote: > > On Thu, 6 Aug 2015 19:34:58 +0200 > > Adrian Remonda wrote: > > > > > > Again, please keep the original alignment and start the second line > > of function arguments right beneath the first argument or else this > > function will be different from others. > > > > Thanks, > > Chris > > Hello Christian, > > Whith the patch applied on my tree this looks properly aligned. Could you > double check? I have also not got any warning about alignment, i think i got 2 warnings about long lines. regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH V4 7/7] Drivers: hv: vmbus: disable local interrupt when hvsock's callback is running
> From: KY Srinivasan > Sent: Friday, August 7, 2015 1:50 > To: Dexuan Cui ; David Miller > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > driverdev-devel@linuxdriverproject.org; linux-ker...@vger.kernel.org; > step...@networkplumber.org; stefa...@redhat.com; net...@vger.kernel.org; > a...@canonical.com; pebo...@tiscali.nl; dan.carpen...@oracle.com > Subject: RE: [PATCH V4 7/7] Drivers: hv: vmbus: disable local interrupt when > hvsock's callback is running > > From: Dexuan Cui > > Sent: Wednesday, August 5, 2015 9:44 PM > > To: David Miller ; KY Srinivasan > > > > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > > driverdev-devel@linuxdriverproject.org; linux-ker...@vger.kernel.org; > > step...@networkplumber.org; stefa...@redhat.com; > > net...@vger.kernel.org; a...@canonical.com; pebo...@tiscali.nl; > > dan.carpen...@oracle.com > > Subject: RE: [PATCH V4 7/7] Drivers: hv: vmbus: disable local interrupt when > > hvsock's callback is running > > > > > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > > Behalf > > > Of Dexuan Cui > > > Sent: Thursday, July 30, 2015 18:18 > > > To: David Miller ; KY Srinivasan > > > > > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > > > driverdev-devel@linuxdriverproject.org; linux-ker...@vger.kernel.org; > > > step...@networkplumber.org; stefa...@redhat.com; > > net...@vger.kernel.org; > > > a...@canonical.com; pebo...@tiscali.nl; dan.carpen...@oracle.com > > > Subject: RE: [PATCH V4 7/7] Drivers: hv: vmbus: disable local interrupt > > when > > > hvsock's callback is running > > > > > > > From: David Miller > > > > Sent: Thursday, July 30, 2015 6:28 > > > > > From: Dexuan Cui > > > > > Date: Tue, 28 Jul 2015 05:35:30 -0700 > > > > > > > > > > In the SMP guest case, when the per-channel callback hvsock_events() > > is > > > > > running on virtual CPU A, if the guest tries to close the connection > > > > > on > > > > > virtual CPU B: we invoke vmbus_close() -> vmbus_close_internal(), > > > > > then we can have trouble: on B, vmbus_close_internal() will send IPI > > > > > reset_channel_cb() to A, trying to set channel->onchannel_callbackto > > NULL; > > > > > on A, if the IPI handler happens between > > > > > "if (channel->onchannel_callback != NULL)" and invoking > > > > > channel->onchannel_callback, we'll invoke a function pointer of NULL. > > > > > > > > > > This is why the patch is necessary. > > > > > > > > > Sorry, I do not accept that you must use conditional locking and/or > > > > IRQ disabling. > > > > > > > > Boil it down to what is necessary for the least common denominator, > > > > and use that unconditionally. > > > > > > Hi David, > > > Thanks for the comment! > > > > > > I agree with you it's not clean to use conditional IRQ disabling. > > > > > > Here I didn't use unconditionally IRQ disabling because the Hyper-V netvsc > > > and storvsc driver's vmbus event callbacks (i.e. netvsc_channel_cb() and > > > storvsc_on_channel_callback()) may take relatively long time (e.g., netvsc > > can > > > operate at a speed of 10Gb) and I think it's bad to disable IRQ for long > > > time > > > when the callbacks are running in a tasklet context, e.g., the Hyper-V > > > timer > > > can be affected: see vmbus_isr() -> hv_process_timer_expiration(). > > > > > > To resolve the race condition between vmbus_close_internal() and > > > process_chn_event() in SMP case, now I propose a new method: > > > > > > we can serialize the 2 paths by adding > > > tasklet_disable(hv_context.event_dpc[channel->target_cpu]) and > > > tasklet_enable(...) in vmbus_close_internal(). > > > > > > In this way, we need the least change and we can drop this patch. > > > > > > Please let me know your opinion. > > > > > > -- Dexuan > > > > Hi David, KY and all, > > > > May I know your opinion about my idea of adding tasklet_disable/enbable() > > in vmbus_close_internal() and dropping this patch? > > Sorry for the delayed response; I think this is a reasonable solution. Send > me the > patch. > > Regards, > > K. Y OK. Will do. Thanks, -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH V4 4/7] Drivers: hv: vmbus: add APIs to register callbacks to process hvsock connection
> -Original Message- > From: KY Srinivasan > Sent: Friday, August 7, 2015 2:28 > To: Dexuan Cui ; David Miller > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > driverdev-devel@linuxdriverproject.org; linux-ker...@vger.kernel.org; > step...@networkplumber.org; stefa...@redhat.com; net...@vger.kernel.org; > a...@canonical.com; pebo...@tiscali.nl; dan.carpen...@oracle.com > Subject: RE: [PATCH V4 4/7] Drivers: hv: vmbus: add APIs to register > callbacks to > process hvsock connection > > > -Original Message- > > From: Dexuan Cui > > Sent: Wednesday, August 5, 2015 9:54 PM > > To: David Miller ; KY Srinivasan > > > > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > > driverdev-devel@linuxdriverproject.org; linux-ker...@vger.kernel.org; > > step...@networkplumber.org; stefa...@redhat.com; > > net...@vger.kernel.org; a...@canonical.com; pebo...@tiscali.nl; > > dan.carpen...@oracle.com > > Subject: RE: [PATCH V4 4/7] Drivers: hv: vmbus: add APIs to register > > callbacks > > to process hvsock connection > > > > > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > > Behalf > > > Of Dexuan Cui > > > Sent: Thursday, July 30, 2015 18:20 > > > To: David Miller ; KY Srinivasan > > > > > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > > > driverdev-devel@linuxdriverproject.org; linux-ker...@vger.kernel.org; > > > step...@networkplumber.org; stefa...@redhat.com; > > net...@vger.kernel.org; > > > a...@canonical.com; pebo...@tiscali.nl; dan.carpen...@oracle.com > > > Subject: RE: [PATCH V4 4/7] Drivers: hv: vmbus: add APIs to register > > callbacks to > > > process hvsock connection > > > > > > > From: David Miller > > > > Sent: Thursday, July 30, 2015 6:27 > > > > > > > > From: Dexuan Cui > > > > Date: Tue, 28 Jul 2015 05:35:11 -0700 > > > > > > > > > With the 2 APIs supplied by the VMBus driver, the coming net/hvsock > > driver > > > > > can register 2 callbacks and can know when a new hvsock connection is > > > > > offered by the host, and when a hvsock connection is being closed by > > the > > > > > host. > > > > > > > > > This is an extremely terrible interface. > > > > > > > > It's an opaque hook that allows on registry, and it's solve purpose > > > > is to allow a backdoor call into a foreign driver in another module. > > > > > > > > These are exactly the things we try to avoid. > > > > > > Hi David, > > > Thanks a lot for your reviewing and the suggestion! > > > > > > > Why not create a real abstraction where clients register an object, > > > > that can be contained as a sub-member inside of their own driver > > > > private, that provides the callback registry mechanism. > > > > Hi David, > > Can you please have a look at my below questions? > > > > I like your idea of a real abstraction. Your answer would definitely > > help me to implement that correctly. > > > > > Please pardon me for my inexperience. > > > Can you please be a bit more specific? > > > I guess maybe you're referencing a common design pattern in the driver > > > code, so an example in some existing driver would be the best. :-) > > > > > > "clients register an object " -- > > > does the "clients" mean the hvsock driver? > > > and the "object" means the 2 callbacks? > > > > > > IMHO, here the vmbus driver has to synchronously pass the 2 events > > > to the hvsock driver, so a "backdoor call into the hvsock driver" is > > > inevitable anyway? > > > > > > e.g., in the path vmbus_process_offer() -> hvsock_process_offer(), the > > > return value of the latter is important to the former, because on error > > > the former needs to clean up some internal states of the vmbus driver > > (that > > > is, the "goto err_deq_chan"). > > > > > > > > > > That way you can register multiple clients, do things like allow > > > > AF_PACKET capturing of vmbus traffic, etc. > > > > > > I thought AF_PACKET can only capture IP packetsor Ethernet frames. > > > Can it be used to capture AF_UNIX packet? > > > If yes, I suppose we can consider making it work for AF_HYPERV too, > > > if people ask for that. > > > > > Dexuan, > > The notion of a channel on Hyper-V has been mapped to a device on Linux and > the mechanism we have > had of notifying the driver of the creation of the channel was through > registering this device with the kernel > (vmbus_device_create). The first exception to this was when we introduced > multi-channel support that broke > the assumption of this one to one mapping between the channel and Linux > device. In the case of the sub-channels, > we handled the driver notification issue via the sub-channel callback that > the > driver registers at the point of > opening the channel. Perhaps we could make the sub-channel handling > mechanism more generic to handle the case > of VMSOCK as well? > > K. Y Good suggestion! Let me think this over and make a new patch. Thanks, -- Dexuan ___ devel mailin
[PATCH 1/7] staging: rtl8188eu: remove unused argument
The function rtw_os_recv_resource_alloc() only uses the argument struct recv_frame *. So remove the other unused argument. Signed-off-by: Sudip Mukherjee --- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/include/recv_osdep.h | 3 +-- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 8501eb8..cce0746 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -89,7 +89,7 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) list_add_tail(&(precvframe->list), &(precvpriv->free_recv_queue.queue)); - res = rtw_os_recv_resource_alloc(padapter, precvframe); + res = rtw_os_recv_resource_alloc(precvframe); precvframe->len = 0; diff --git a/drivers/staging/rtl8188eu/include/recv_osdep.h b/drivers/staging/rtl8188eu/include/recv_osdep.h index 0809963..0f32005 100644 --- a/drivers/staging/rtl8188eu/include/recv_osdep.h +++ b/drivers/staging/rtl8188eu/include/recv_osdep.h @@ -38,8 +38,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup); int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter); void rtw_free_recv_priv(struct recv_priv *precvpriv); -int rtw_os_recv_resource_alloc(struct adapter *adapt, - struct recv_frame *recvfr); +int rtw_os_recv_resource_alloc(struct recv_frame *recvfr); int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf); diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 0570132..4849e6b 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -29,8 +29,7 @@ #include /* alloc os related resource in struct recv_frame */ -int rtw_os_recv_resource_alloc(struct adapter *padapter, - struct recv_frame *precvframe) +int rtw_os_recv_resource_alloc(struct recv_frame *precvframe) { precvframe->pkt_newalloc = NULL; precvframe->pkt = NULL; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/7] staging: rtl8188eu: make function void
The return value of rtw_os_recv_resource_alloc() is never checked, so make it as void. Moreover as of now the function can not fail. Signed-off-by: Sudip Mukherjee --- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/include/recv_osdep.h | 2 +- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index cce0746..b347a81 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -89,7 +89,7 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) list_add_tail(&(precvframe->list), &(precvpriv->free_recv_queue.queue)); - res = rtw_os_recv_resource_alloc(precvframe); + rtw_os_recv_resource_alloc(precvframe); precvframe->len = 0; diff --git a/drivers/staging/rtl8188eu/include/recv_osdep.h b/drivers/staging/rtl8188eu/include/recv_osdep.h index 0f32005..fdeb603 100644 --- a/drivers/staging/rtl8188eu/include/recv_osdep.h +++ b/drivers/staging/rtl8188eu/include/recv_osdep.h @@ -38,7 +38,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup); int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter); void rtw_free_recv_priv(struct recv_priv *precvpriv); -int rtw_os_recv_resource_alloc(struct recv_frame *recvfr); +void rtw_os_recv_resource_alloc(struct recv_frame *recvfr); int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf); diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 4849e6b..49d8845 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -29,11 +29,10 @@ #include /* alloc os related resource in struct recv_frame */ -int rtw_os_recv_resource_alloc(struct recv_frame *precvframe) +void rtw_os_recv_resource_alloc(struct recv_frame *precvframe) { precvframe->pkt_newalloc = NULL; precvframe->pkt = NULL; - return _SUCCESS; } /* alloc os related resource in struct recv_buf */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 7/7] staging: rtl8188eu: remove multiple blank line
Multiple blank lines is against the kernel coding style and checkpatch complains for that. Signed-off-by: Sudip Mukherjee --- drivers/staging/rtl8188eu/core/rtw_recv.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 0bb5cccb..44eeb03 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -113,7 +113,6 @@ void _rtw_free_recv_priv(struct recv_priv *precvpriv) { struct adapter *padapter = precvpriv->adapter; - rtw_free_uc_swdec_pending_queue(padapter); if (precvpriv->pallocated_frame_buf) { @@ -149,7 +148,6 @@ struct recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue) } } - return (struct recv_frame *)hdr; } @@ -196,7 +194,6 @@ int rtw_free_recvframe(struct recv_frame *precvframe, spin_unlock_bh(&pfree_recv_queue->lock); - return _SUCCESS; } @@ -205,7 +202,6 @@ int _rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue) struct adapter *padapter = precvframe->adapter; struct recv_priv *precvpriv = &padapter->recvpriv; - list_del_init(&(precvframe->list)); list_add_tail(&(precvframe->list), get_list_head(queue)); @@ -214,7 +210,6 @@ int _rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue) precvpriv->free_recvframe_cnt++; } - return _SUCCESS; } @@ -409,7 +404,6 @@ static int recvframe_chkmic(struct adapter *adapter, exit: - return res; } @@ -471,7 +465,6 @@ static struct recv_frame *decryptor(struct adapter *padapter, return_packet = NULL; } - return return_packet; } @@ -490,7 +483,6 @@ static struct recv_frame *portctrl(struct adapter *adapter, struct rx_pkt_attrib *pattrib; __be16 be_tmp; - pstapriv = &adapter->stapriv; auth_alg = adapter->securitypriv.dot11AuthAlgrthm; @@ -549,7 +541,6 @@ static struct recv_frame *portctrl(struct adapter *adapter, prtnframe = precv_frame; } - return prtnframe; } @@ -561,7 +552,6 @@ static int recv_decache(struct recv_frame *precv_frame, u8 bretry, u16 seq_ctrl = ((precv_frame->attrib.seq_num&0x) << 4) | (precv_frame->attrib.frag_num & 0xf); - if (tid > 15) { RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("recv_decache, (tid>15)! seq_ctrl=0x%x, tid=0x%x\n", seq_ctrl, tid)); @@ -578,7 +568,6 @@ static int recv_decache(struct recv_frame *precv_frame, u8 bretry, prxcache->tid_rxseq[tid] = seq_ctrl; - return _SUCCESS; } @@ -715,7 +704,6 @@ int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame, u8 *sta_addr = NULL; int bmcast = IS_MCAST(pattrib->dst); - if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) { /* filter packets that SA is myself or multicast or broadcast */ @@ -803,7 +791,6 @@ static int ap2sta_data_frame( u8 *myhwaddr = myid(&adapter->eeprompriv); int bmcast = IS_MCAST(pattrib->dst); - if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) && (check_fwstate(pmlmepriv, _FW_LINKED) == true || check_fwstate(pmlmepriv, _FW_UNDER_LINKING))) { @@ -895,7 +882,6 @@ static int ap2sta_data_frame( exit: - return ret; } @@ -910,7 +896,6 @@ static int sta2ap_data_frame(struct adapter *adapter, unsigned char *mybssid = get_bssid(pmlmepriv); int ret = _SUCCESS; - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { /* For AP mode, RA = BSSID, TX = STA(SRC_ADDR), A3 = DST_ADDR */ if (memcmp(pattrib->bssid, mybssid, ETH_ALEN)) { @@ -955,7 +940,6 @@ static int sta2ap_data_frame(struct adapter *adapter, exit: - return ret; } @@ -1137,7 +1121,6 @@ static int validate_recv_data_frame(struct adapter *adapter, struct security_priv*psecuritypriv = &adapter->securitypriv; int ret = _SUCCESS; - bretry = GetRetry(ptr); pda = get_da(ptr); psa = get_sa(ptr); @@ -1241,7 +1224,6 @@ static int validate_recv_data_frame(struct adapter *adapter, exit: - return ret; } @@ -1261,7 +1243,6 @@ static int validate_recv_frame(struct adapter *adapter, u8 ver = (unsigned char)(*ptr)&0x3; struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; - if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) { int ch_set_idx = rtw_ch_set_search_ch(pmlmeext->channel_set, rtw_get_oper_ch(adapter)); if (ch_set_idx >= 0) @@ -1350,7 +1331,6 @@ static int validate_recv_frame(struct adapter *adapter
[PATCH 5/7] staging: rtl8188eu: remove exit label
An exit label which does nothing except return, is not worth having. So remove it. Signed-off-by: Sudip Mukherjee --- drivers/staging/rtl8188eu/core/rtw_recv.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index b347a81..c011dc8 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -74,10 +74,8 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) precvpriv->pallocated_frame_buf = vzalloc(NR_RECVFRAME * sizeof(struct recv_frame) + RXFRAME_ALIGN_SZ); - if (precvpriv->pallocated_frame_buf == NULL) { - res = _FAIL; - goto exit; - } + if (!precvpriv->pallocated_frame_buf) + return _FAIL; precvpriv->precv_frame_buf = (u8 *)N_BYTE_ALIGMENT((size_t)(precvpriv->pallocated_frame_buf), RXFRAME_ALIGN_SZ); @@ -107,8 +105,6 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) precvpriv->signal_stat_sampling_interval = 1000; /* ms */ rtw_set_signal_stat_timer(precvpriv); -exit: - return res; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/7] staging: rtl8188eu: remove unused function
The function rtw_init_recvframe() was not being used. Signed-off-by: Sudip Mukherjee --- drivers/staging/rtl8188eu/core/rtw_recv.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index c011dc8..0bb5cccb 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -166,14 +166,6 @@ struct recv_frame *rtw_alloc_recvframe(struct __queue *pfree_recv_queue) return precvframe; } -void rtw_init_recvframe(struct recv_frame *precvframe, struct recv_priv *precvpriv) -{ - /* Perry: This can be removed */ - INIT_LIST_HEAD(&precvframe->list); - - precvframe->len = 0; -} - int rtw_free_recvframe(struct recv_frame *precvframe, struct __queue *pfree_recv_queue) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/7] staging: rtl8188eu: rearrange code
Re-arrange the code to directly return success or failure, thus removing the variable used in the function. Signed-off-by: Sudip Mukherjee --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 49d8845..3350bf3 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -39,14 +39,12 @@ void rtw_os_recv_resource_alloc(struct recv_frame *precvframe) int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, struct recv_buf *precvbuf) { - int res = _SUCCESS; - - precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL); - if (precvbuf->purb == NULL) - res = _FAIL; precvbuf->pskb = NULL; precvbuf->reuse = false; - return res; + precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL); + if (!precvbuf->purb) + return _FAIL; + return _SUCCESS; } void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/7] staging: rtl8188eu: remove unused define
_RECV_OSDEP_C_ was only defined here but never checked anywhere. Signed-off-by: Sudip Mukherjee --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 3350bf3..3ebb8b2 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -17,8 +17,6 @@ * * **/ -#define _RECV_OSDEP_C_ - #include #include -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/5] staging: sm750fb: remove multiple blank line
Multiple blank lines are not kernel coding style and so checkpatch complains. Remove them. Signed-off-by: Sudip Mukherjee --- drivers/staging/sm750fb/sm750.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index c7ab818..8990ff4 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -26,7 +26,6 @@ int smi_indent; - /* * #ifdef __BIG_ENDIAN * ssize_t lynxfb_ops_write(struct fb_info *info, const char __user *buf, @@ -40,7 +39,6 @@ typedef void (*PROC_SPEC_SETUP)(struct lynx_share*, char *); typedef int (*PROC_SPEC_MAP)(struct lynx_share*, struct pci_dev*); typedef int (*PROC_SPEC_INITHW)(struct lynx_share*, struct pci_dev*); - /* common var for all device */ static int g_hwcursor = 1; static int g_noaccel; @@ -51,7 +49,6 @@ static char *g_settings; static int g_dualview; static char *g_option; - static const struct fb_videomode lynx750_ext[] = { /* 1024x600-60 VESA[1.71:1] */ {NULL, 60, 1024, 600, 20423, 144, 40, 18, 1, 104, 3, @@ -115,8 +112,6 @@ static const struct fb_videomode lynx750_ext[] = { }; - - /* no hardware cursor supported under version 2.6.10, kernel bug */ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) { @@ -160,7 +155,6 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) cursor->setColor(cursor, fg, bg); } - if (fbcursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) { cursor->setData(cursor, fbcursor->rop, @@ -300,7 +294,6 @@ static int lynxfb_ops_pan_display(struct fb_var_screeninfo *var, struct lynxfb_crtc *crtc; int ret; - if (!info) return -EINVAL; @@ -466,7 +459,6 @@ static int lynxfb_resume(struct pci_dev *pdev) int ret; - ret = 0; share = pci_get_drvdata(pdev); @@ -478,7 +470,6 @@ static int lynxfb_resume(struct pci_dev *pdev) return ret; } - if (pdev->dev.power.power_state.event != PM_EVENT_FREEZE) { pci_restore_state(pdev); ret = pci_enable_device(pdev); @@ -493,7 +484,6 @@ static int lynxfb_resume(struct pci_dev *pdev) hw_sm750_inithw(share, pdev); - info = share->fbinfo[0]; if (info) { @@ -518,7 +508,6 @@ static int lynxfb_resume(struct pci_dev *pdev) fb_set_suspend(info, 0); } - console_unlock(); return ret; } @@ -534,7 +523,6 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var, int ret; resource_size_t request; - par = info->par; crtc = &par->crtc; output = &par->output; @@ -546,7 +534,6 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var, var->yres, var->bits_per_pixel); - switch (var->bits_per_pixel) { case 8: case 16: @@ -617,7 +604,6 @@ exit: return ret; } - static int lynxfb_ops_setcolreg(unsigned regno, unsigned red, unsigned green, @@ -652,7 +638,6 @@ static int lynxfb_ops_setcolreg(unsigned regno, goto exit; } - if (info->fix.visual == FB_VISUAL_TRUECOLOR && regno < 256) { u32 val; @@ -782,7 +767,6 @@ static struct fb_ops lynxfb_ops = { .fb_cursor = lynxfb_ops_cursor, }; - static int lynxfb_set_fbinfo(struct fb_info *info, int index) { int i; @@ -803,7 +787,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) "kernel HELPERS prepared vesa_modes", }; - static const char *fixId[2] = { "sm750_fb1", "sm750_fb2", }; @@ -824,7 +807,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) sm750fb_set_drv(par); lynxfb_ops.fb_pan_display = lynxfb_ops_pan_display; - /* set current cursor variable and proc pointer, * must be set after crtc member initialized */ crtc->cursor.offset = crtc->oScreen + crtc->vidmem_size - 1024; @@ -841,7 +823,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) crtc->cursor.setData = hw_cursor_setData; crtc->cursor.vstart = share->pvMem + crtc->cursor.offset; - crtc->cursor.share = share; memset_io(crtc->cursor.vstart, 0, crtc->cursor.size); if (!g_hwcursor) { @@ -849,7 +830,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) crtc->cursor.disable(&crtc->cursor); } - /* set info->fbops, must be set before fb_find_mode */ if (!share->accel_off) { /* use 2d acceleration */ @@ -865,7 +845,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) g_fbm
[PATCH 5/5] staging: sm750fb: simplify return
Lets return the return value directly instead of using a variable to store the result. Signed-off-by: Sudip Mukherjee --- drivers/staging/sm750fb/sm750.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index e7fad0f..07f8afd 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -298,17 +298,13 @@ static int lynxfb_ops_pan_display(struct fb_var_screeninfo *var, { struct lynxfb_par *par; struct lynxfb_crtc *crtc; - int ret; if (!info) return -EINVAL; - ret = 0; par = info->par; crtc = &par->crtc; - ret = crtc->proc_panDisplay(crtc, var, info); - - return ret; + return crtc->proc_panDisplay(crtc, var, info); } static int lynxfb_ops_set_par(struct fb_info *info) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/5] staging: sm750fb: fix multiline comment
Multiline comments are edited to be in the kernel coding style. Signed-off-by: Sudip Mukherjee --- drivers/staging/sm750fb/sm750.c | 63 + 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index c16b293..fa2183d 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -182,8 +182,10 @@ static void lynxfb_ops_fillrect(struct fb_info *info, par = info->par; share = par->share; - /* each time 2d function begin to work,below three variable always need -* be set, seems we can put them together in some place */ + /* +* each time 2d function begin to work,below three variable always need +* be set, seems we can put them together in some place +*/ base = par->crtc.oScreen; pitch = info->fix.line_length; Bpp = info->var.bits_per_pixel >> 3; @@ -218,8 +220,10 @@ static void lynxfb_ops_copyarea(struct fb_info *info, par = info->par; share = par->share; - /* each time 2d function begin to work,below three variable always need -* be set, seems we can put them together in some place */ + /* +* each time 2d function begin to work,below three variable always need +* be set, seems we can put them together in some place +*/ base = par->crtc.oScreen; pitch = info->fix.line_length; Bpp = info->var.bits_per_pixel >> 3; @@ -249,8 +253,10 @@ static void lynxfb_ops_imageblit(struct fb_info *info, par = info->par; share = par->share; - /* each time 2d function begin to work,below three variable always need -* be set, seems we can put them together in some place */ + /* +* each time 2d function begin to work,below three variable always need +* be set, seems we can put them together in some place +*/ base = par->crtc.oScreen; pitch = info->fix.line_length; Bpp = info->var.bits_per_pixel >> 3; @@ -334,9 +340,10 @@ static int lynxfb_ops_set_par(struct fb_info *info) fix->line_length = line_length; pr_info("fix->line_length = %d\n", fix->line_length); - /* var->red,green,blue,transp are need to be set by driver + /* +* var->red,green,blue,transp are need to be set by driver * and these data should be set before setcolreg routine -* */ +*/ switch (var->bits_per_pixel) { case 8: @@ -811,8 +818,10 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) sm750fb_set_drv(par); lynxfb_ops.fb_pan_display = lynxfb_ops_pan_display; - /* set current cursor variable and proc pointer, -* must be set after crtc member initialized */ + /* +* set current cursor variable and proc pointer, +* must be set after crtc member initialized +*/ crtc->cursor.offset = crtc->oScreen + crtc->vidmem_size - 1024; crtc->cursor.mmio = share->pvReg + 0x800f0 + (int)crtc->channel * 0x140; @@ -920,12 +929,13 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) fix->smem_start = crtc->oScreen + share->vidmem_start; pr_info("fix->smem_start = %lx\n", fix->smem_start); - /* according to mmap experiment from user space application, + /* +* according to mmap experiment from user space application, * fix->mmio_len should not larger than virtual size * (xres_virtual x yres_virtual x ByPP) * Below line maybe buggy when user mmap fb dev node and write * data into the bound over virtual size -* */ +*/ fix->smem_len = crtc->vidmem_size; pr_info("fix->smem_len = %x\n", fix->smem_len); info->screen_size = fix->smem_len; @@ -1083,8 +1093,10 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, goto err_enable; } - /* though offset of share in sm750_share is 0, -* we use this marcro as the same */ + /* +* though offset of share in sm750_share is 0, +* we use this marcro as the same +*/ spec_offset = offsetof(struct sm750_share, share); spec_share = kzalloc(sizeof(*spec_share), GFP_KERNEL); @@ -1108,10 +1120,12 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, spin_lock_init(&share->slock); if (!share->accel_off) { - /* hook deInit and 2d routines, notes that below hw_xxx + /* +* hook deInit and 2d routines, notes that below hw_xxx * routine can work on most of lynx chips * if some chip need specific function, -* please hook it in smXXX_set_drv routine */ +* please hook it in smXXX_set_drv routine +*/ share->accel.de_init = hw_de_init;
[PATCH 2/5] staging: sm750fb: space around operator
Kernel coding style says to have a space around the operators. Signed-off-by: Sudip Mukherjee --- This patch will generate checkpatch warning about longline in 2 places, those were not fixed to keep the readability. Will fix them later. The warnings were already there, this patch has not introduced them. drivers/staging/sm750fb/sm750.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 8990ff4..c16b293 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -144,12 +144,12 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) /* get the 16bit color of kernel means */ u16 fg, bg; - fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800))| - ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5)| + fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) | + ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) | ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11); - bg = ((info->cmap.red[fbcursor->image.bg_color] & 0xf800))| - ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5)| + bg = ((info->cmap.red[fbcursor->image.bg_color] & 0xf800)) | + ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5) | ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11); cursor->setColor(cursor, fg, bg); @@ -188,8 +188,9 @@ static void lynxfb_ops_fillrect(struct fb_info *info, pitch = info->fix.line_length; Bpp = info->var.bits_per_pixel >> 3; - color = (Bpp == 1)?region->color:((u32 *)info->pseudo_palette)[region->color]; - rop = (region->rop != ROP_COPY) ? HW_ROP2_XOR:HW_ROP2_COPY; + color = (Bpp == 1) ? region->color : + ((u32 *)info->pseudo_palette)[region->color]; + rop = (region->rop != ROP_COPY) ? HW_ROP2_XOR : HW_ROP2_COPY; /* * If not use spin_lock,system will die if user load driver @@ -278,7 +279,7 @@ _do_work: spin_lock(&share->slock); share->accel.de_imageblit(&share->accel, - image->data, image->width>>3, 0, + image->data, image->width >> 3, 0, base, pitch, Bpp, image->dx, image->dy, image->width, image->height, @@ -684,7 +685,8 @@ static int sm750fb_set_drv(struct lynxfb_par *par) output = &par->output; crtc = &par->crtc; - crtc->vidmem_size = (share->dual)?share->vidmem_size>>1:share->vidmem_size; + crtc->vidmem_size = (share->dual) ? share->vidmem_size >> 1 : +share->vidmem_size; /* setup crtc and output member */ spec_share->hwCursor = g_hwcursor; @@ -701,10 +703,12 @@ static int sm750fb_set_drv(struct lynxfb_par *par) output->proc_setMode = hw_sm750_output_setMode; output->proc_checkMode = hw_sm750_output_checkMode; - output->proc_setBLANK = (share->revid == SM750LE_REVISION_ID)?hw_sm750le_setBLANK:hw_sm750_setBLANK; + output->proc_setBLANK = (share->revid == SM750LE_REVISION_ID) ? +hw_sm750le_setBLANK : hw_sm750_setBLANK; output->clear = hw_sm750_output_clear; /* chip specific phase */ - share->accel.de_wait = (share->revid == SM750LE_REVISION_ID)?hw_sm750le_deWait : hw_sm750_deWait; + share->accel.de_wait = (share->revid == SM750LE_REVISION_ID) ? + hw_sm750le_deWait : hw_sm750_deWait; switch (spec_share->state.dataflow) { case sm750_simul_pri: output->paths = sm750_pnc; @@ -814,7 +818,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); crtc->cursor.maxH = crtc->cursor.maxW = 64; - crtc->cursor.size = crtc->cursor.maxH*crtc->cursor.maxW*2/8; + crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW * 2 / 8; crtc->cursor.disable = hw_cursor_disable; crtc->cursor.enable = hw_cursor_enable; crtc->cursor.setColor = hw_cursor_setColor; @@ -896,13 +900,13 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) /* set info */ line_length = PADDING(crtc->line_pad, - (var->xres_virtual * var->bits_per_pixel/8)); + (var->xres_virtual * var->bits_per_pixel / 8)); info->pseudo_palette = &par->pseudo_palette[0]; info->screen_base = crtc->vScreen; pr_debug("screen_base vaddr = %p\n", info->screen_base); info->screen_size = l
[PATCH 4/5] staging: sm750fb: rearrange code
Rearrange the code to remove one exit label which also makes the code less indented and more readable. Signed-off-by: Sudip Mukherjee --- drivers/staging/sm750fb/sm750.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index fa2183d..e7fad0f 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -261,22 +261,21 @@ static void lynxfb_ops_imageblit(struct fb_info *info, pitch = info->fix.line_length; Bpp = info->var.bits_per_pixel >> 3; - if (image->depth == 1) { - if (info->fix.visual == FB_VISUAL_TRUECOLOR || - info->fix.visual == FB_VISUAL_DIRECTCOLOR) { - fgcol = ((u32 *)info->pseudo_palette)[image->fg_color]; - bgcol = ((u32 *)info->pseudo_palette)[image->bg_color]; - } else { - fgcol = image->fg_color; - bgcol = image->bg_color; - } - goto _do_work; - } /* TODO: Implement hardware acceleration for image->depth > 1 */ - cfb_imageblit(info, image); - return; + if (image->depth != 1) { + cfb_imageblit(info, image); + return; + } + + if (info->fix.visual == FB_VISUAL_TRUECOLOR || + info->fix.visual == FB_VISUAL_DIRECTCOLOR) { + fgcol = ((u32 *)info->pseudo_palette)[image->fg_color]; + bgcol = ((u32 *)info->pseudo_palette)[image->bg_color]; + } else { + fgcol = image->fg_color; + bgcol = image->bg_color; + } -_do_work: /* * If not use spin_lock, system will die if user load driver * and immediately unload driver frequently (dual) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8723au: Fix sparse warning: cast to restricted __le16
Johannes Postma writes: > On 06/08/15 at 08:21am, Jes Sorensen wrote: >> >> Looks OK to me. Probably worth changing the *(usPtr + index) to be >> usPtr[index] as well to make the code easier to read. >> >> Jes >> > > Thank you for reviewing. I will make a seperate patch for that. I will > send it after this one is accepted. Or should I combine them into a > patch serie? Either is fine with me. Jes ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH RESEND 1/3] staging: sm7xxfb: merge sm712fb with fbdev
Now since all cleanups are done and the code is ready to be merged lets move it out of staging into fbdev location. Signed-off-by: Sudip Mukherjee --- Hi Greg, Resending the patch series as discussed with you. Patch generated with -M, thought it will be easy for you to review. drivers/staging/Kconfig| 2 -- drivers/staging/Makefile | 1 - drivers/staging/sm7xxfb/Kconfig| 13 - drivers/staging/sm7xxfb/Makefile | 1 - drivers/staging/sm7xxfb/TODO | 12 drivers/video/fbdev/Kconfig| 14 ++ drivers/video/fbdev/Makefile | 1 + drivers/{staging/sm7xxfb/sm7xx.h => video/fbdev/sm712.h} | 0 .../{staging/sm7xxfb/sm7xxfb.c => video/fbdev/sm712fb.c} | 2 +- 9 files changed, 16 insertions(+), 30 deletions(-) delete mode 100644 drivers/staging/sm7xxfb/Kconfig delete mode 100644 drivers/staging/sm7xxfb/Makefile delete mode 100644 drivers/staging/sm7xxfb/TODO rename drivers/{staging/sm7xxfb/sm7xx.h => video/fbdev/sm712.h} (100%) rename drivers/{staging/sm7xxfb/sm7xxfb.c => video/fbdev/sm712fb.c} (99%) diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 4f0b12d..39c5df6 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -56,8 +56,6 @@ source "drivers/staging/vt6656/Kconfig" source "drivers/staging/iio/Kconfig" -source "drivers/staging/sm7xxfb/Kconfig" - source "drivers/staging/sm750fb/Kconfig" source "drivers/staging/xgifb/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 37149ca..018093d 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -22,7 +22,6 @@ obj-$(CONFIG_VT6655) += vt6655/ obj-$(CONFIG_VT6656) += vt6656/ obj-$(CONFIG_VME_BUS) += vme/ obj-$(CONFIG_IIO) += iio/ -obj-$(CONFIG_FB_SM7XX) += sm7xxfb/ obj-$(CONFIG_FB_SM750) += sm750fb/ obj-$(CONFIG_FB_XGI) += xgifb/ obj-$(CONFIG_USB_EMXX) += emxx_udc/ diff --git a/drivers/staging/sm7xxfb/Kconfig b/drivers/staging/sm7xxfb/Kconfig deleted file mode 100644 index e2922ae..000 --- a/drivers/staging/sm7xxfb/Kconfig +++ /dev/null @@ -1,13 +0,0 @@ -config FB_SM7XX - tristate "Silicon Motion SM7XX framebuffer support" - depends on FB && PCI - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - help - Frame buffer driver for the Silicon Motion SM710, SM712, SM721 - and SM722 chips. - - This driver is also available as a module. The module will be - called sm7xxfb. If you want to compile it as a module, say M - here and read . diff --git a/drivers/staging/sm7xxfb/Makefile b/drivers/staging/sm7xxfb/Makefile deleted file mode 100644 index 48f471c..000 --- a/drivers/staging/sm7xxfb/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-$(CONFIG_FB_SM7XX) += sm7xxfb.o diff --git a/drivers/staging/sm7xxfb/TODO b/drivers/staging/sm7xxfb/TODO deleted file mode 100644 index 7cb0b24..000 --- a/drivers/staging/sm7xxfb/TODO +++ /dev/null @@ -1,12 +0,0 @@ -TODO: -- Dual head support -- 2D acceleration support -- use kernel coding style -- refine the code and remove unused code -- move it to drivers/video/fbdev/sm7xxfb.c - -Please send any patches to - Greg Kroah-Hartman - Sudip Mukherjee - Teddy Wang - Sudip Mukherjee diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 2d98de5..2307909 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -2475,3 +2475,17 @@ config FB_SSD1307 help This driver implements support for the Solomon SSD1307 OLED controller over I2C. + +config FB_SM712 + tristate "Silicon Motion SM712 framebuffer support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Frame buffer driver for the Silicon Motion SM710, SM712, SM721 + and SM722 chips. + + This driver is also available as a module. The module will be + called sm712fb. If you want to compile it as a module, say M + here and read . diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile index cecea50..50ed1b4 100644 --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -131,6 +131,7 @@ obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o obj-$(CONFIG_FB_PUV3_UNIGFX) += fb-puv3.o obj-$(CONFIG_FB_HYPERV) += hyperv_fb.o obj-$(CONFIG_FB_OPENCORES) += ocfb.o +obj-$(CONFIG_FB_SM712) += sm712fb.o # Platform or fallback drivers go here obj-$(CONFIG_FB_UVESA)+= uvesafb.o diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/drivers/video/fbdev/sm712.h similarity index
[PATCH RESEND 3/3] MAINTAINERS: update maintainers list
Now since sm712fb has moved out of staging update the maintainers list accordingly. Signed-off-by: Sudip Mukherjee --- MAINTAINERS | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 9289ecb..ba6c537 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9324,6 +9324,15 @@ S: Maintained F: drivers/media/i2c/ov2659.c F: include/media/ov2659.h +SILICON MOTION SM712 FRAME BUFFER DRIVER +M: Sudip Mukherjee +M: Teddy Wang +M: Sudip Mukherjee +L: linux-fb...@vger.kernel.org +S: Maintained +F: drivers/video/fbdev/sm712* +F: Documentation/fb/sm712fb.txt + SIS 190 ETHERNET DRIVER M: Francois Romieu L: net...@vger.kernel.org @@ -9744,14 +9753,6 @@ L: linux-wirel...@vger.kernel.org S: Maintained F: drivers/staging/rtl8723au/ -STAGING - SILICON MOTION SM7XX FRAME BUFFER DRIVER -M: Sudip Mukherjee -M: Teddy Wang -M: Sudip Mukherjee -L: linux-fb...@vger.kernel.org -S: Maintained -F: drivers/staging/sm7xxfb/ - STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER M: Sudip Mukherjee M: Teddy Wang -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH RESEND 2/3] Documentation/fb: add documentation for sm712fb
Create the documentation for SM712. Mention all the supported modes and how to use. Signed-off-by: Sudip Mukherjee --- Documentation/fb/sm712fb.txt | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/fb/sm712fb.txt diff --git a/Documentation/fb/sm712fb.txt b/Documentation/fb/sm712fb.txt new file mode 100644 index 000..c388442 --- /dev/null +++ b/Documentation/fb/sm712fb.txt @@ -0,0 +1,31 @@ +What is sm712fb? += + +This is a graphics framebuffer driver for Silicon Motion SM712 based processors. + +How to use it? +== + +Switching modes is done using the video=sm712fb:... boot parameter. + +If you want, for example, enable a resolution of 1280x1024x24bpp you should +pass to the kernel this command line: "video=sm712fb:0x31B". + +You should not compile-in vesafb. + +Currently supported video modes are: + +[Graphic modes] + +bpp | 640x480 800x600 1024x768 1280x1024 ++ + 8 | 0x3010x3030x3050x307 + 16 | 0x3110x3140x3170x31A + 24 | 0x3120x3150x3180x31B + +Missing Features + +(alias TODO list) + + * 2D acceleratrion + * dual-head support -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8723au: rtl8723a_hal_init: Improve code readability
This patch improves code readability in the function rtl8723a_cal_txdesc_chksum. It improves the readability of the argument of the function le16_to_cpu. Signed-off-by: Johannes Postma --- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index eb76ac4..cf2388f 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -1847,7 +1847,7 @@ static void rtl8723a_cal_txdesc_chksum(struct tx_desc *ptxdesc) ptxdesc->txdw7 &= cpu_to_le32(0x); for (index = 0; index < count; index++) - checksum ^= le16_to_cpu(*(usPtr + index)); + checksum ^= le16_to_cpu(usPtr[index]); ptxdesc->txdw7 |= cpu_to_le32(checksum & 0x); } -- 2.5.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8723au: Fix sparse warning: cast to restricted __le16
On 07/08/15 at 08:26am, Jes Sorensen wrote: > Johannes Postma writes: > > On 06/08/15 at 08:21am, Jes Sorensen wrote: > >> > >> Looks OK to me. Probably worth changing the *(usPtr + index) to be > >> usPtr[index] as well to make the code easier to read. > >> > >> Jes > >> > > > > Thank you for reviewing. I will make a seperate patch for that. I will > > send it after this one is accepted. Or should I combine them into a > > patch serie? > > Either is fine with me. > > Jes Ok, I have sent it as a separate patch. Since it doesn't depend on this patch and should apply cleanly I have already sent it in. Johannes ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8723au: rtl8723a_hal_init: Improve code readability
Johannes Postma writes: > This patch improves code readability in the function > rtl8723a_cal_txdesc_chksum. It improves the readability of the argument > of the function le16_to_cpu. > > Signed-off-by: Johannes Postma > --- > drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Jes Sorensen ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH RFC v2 07/16] media: get rid of unused "extra_links" param on media_entity_init()
Currently, media_entity_init() creates an array with the links, allocated at init time. It provides a parameter (extra_links) that would allocate more links than the current needs, but this is not used by any driver. As we want to be able to do dynamic link allocation/removal, we'll need to change the implementation of the links. So, before doing that, let's first remove that extra unused parameter, in order to cleanup the interface first. Signed-off-by: Mauro Carvalho Chehab diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt index f552a75c0e70..2cc6019f7147 100644 --- a/Documentation/media-framework.txt +++ b/Documentation/media-framework.txt @@ -104,7 +104,7 @@ although drivers can allocate entities directly. Drivers initialize entities by calling media_entity_init(struct media_entity *entity, u16 num_pads, - struct media_pad *pads, u16 extra_links); + struct media_pad *pads); The media_entity name, type, flags, revision and group_id fields can be initialized before or after calling media_entity_init. Entities embedded in diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 75d5c18d689a..109cc3792534 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt @@ -300,7 +300,7 @@ calling media_entity_init(): struct media_pad *pads = &my_sd->pads; int err; - err = media_entity_init(&sd->entity, npads, pads, 0); + err = media_entity_init(&sd->entity, npads, pads); The pads array must have been previously initialized. There is no need to manually set the struct media_entity type and name fields, but the revision @@ -700,7 +700,7 @@ calling media_entity_init(): struct media_pad *pad = &my_vdev->pad; int err; - err = media_entity_init(&vdev->entity, 1, pad, 0); + err = media_entity_init(&vdev->entity, 1, pad); The pads array must have been previously initialized. There is no need to manually set the struct media_entity type and name fields. diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt b/Documentation/zh_CN/video4linux/v4l2-framework.txt index 2b828e631e31..ff815cb92031 100644 --- a/Documentation/zh_CN/video4linux/v4l2-framework.txt +++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt @@ -295,7 +295,7 @@ owner ??? i2c ? struct media_pad *pads = &my_sd->pads; int err; - err = media_entity_init(&sd->entity, npads, pads, 0); + err = media_entity_init(&sd->entity, npads, pads); pads media_entity ??? type ??? name revision ? @@ -602,7 +602,7 @@ v4l2_file_operations file_operations ??? struct media_pad *pad = &my_vdev->pad; int err; - err = media_entity_init(&vdev->entity, 1, pad, 0); + err = media_entity_init(&vdev->entity, 1, pad); pads ?? media_entity ??? type ??? name ?? diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 13bb57f0457f..2fdcbb5f000a 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -249,7 +249,7 @@ static void dvb_register_media_device(struct dvb_device *dvbdev, } if (npads) - ret = media_entity_init(dvbdev->entity, npads, dvbdev->pads, 0); + ret = media_entity_init(dvbdev->entity, npads, dvbdev->pads); if (!ret) ret = media_device_register_entity(dvbdev->adapter->mdev, dvbdev->entity); diff --git a/drivers/media/i2c/ad9389b.c b/drivers/media/i2c/ad9389b.c index 69094ab047b1..39d6ee681aeb 100644 --- a/drivers/media/i2c/ad9389b.c +++ b/drivers/media/i2c/ad9389b.c @@ -1158,7 +1158,7 @@ static int ad9389b_probe(struct i2c_client *client, const struct i2c_device_id * state->rgb_quantization_range_ctrl->is_private = true; state->pad.flags = MEDIA_PAD_FL_SINK; - err = media_entity_init(&sd->entity, 1, &state->pad, 0); + err = media_entity_init(&sd->entity, 1, &state->pad); if (err) goto err_hdl; diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c index c70ababce954..5f76997f6e07 100644 --- a/drivers/media/i2c/adp1653.c +++ b/drivers/media/i2c/adp1653.c @@ -512,7 +512,7 @@ static int adp1653_probe(struct i2c_client *client, if (ret) goto free_and_quit; - ret = media_entity_init(&flash->subdev.entity, 0, NULL, 0); + ret = media_entity_init(&flash->subdev.entity, 0, NULL); if (ret < 0) goto free_and_quit; diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index
[PATCH 01/14] staging: comedi: addi_tcw.h: prefer using the BIT macro
Use the BIT macro to define the register bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_tcw.h | 48 +++ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_tcw.h b/drivers/staging/comedi/drivers/addi_tcw.h index 8794d4c..547f503 100644 --- a/drivers/staging/comedi/drivers/addi_tcw.h +++ b/drivers/staging/comedi/drivers/addi_tcw.h @@ -10,44 +10,44 @@ #define ADDI_TCW_VAL_REG 0x00 #define ADDI_TCW_SYNC_REG 0x00 -#define ADDI_TCW_SYNC_CTR_TRIG (1 << 8) -#define ADDI_TCW_SYNC_CTR_DIS (1 << 7) -#define ADDI_TCW_SYNC_CTR_ENA (1 << 6) -#define ADDI_TCW_SYNC_TIMER_TRIG (1 << 5) -#define ADDI_TCW_SYNC_TIMER_DIS(1 << 4) -#define ADDI_TCW_SYNC_TIMER_ENA(1 << 3) -#define ADDI_TCW_SYNC_WDOG_TRIG(1 << 2) -#define ADDI_TCW_SYNC_WDOG_DIS (1 << 1) -#define ADDI_TCW_SYNC_WDOG_ENA (1 << 0) +#define ADDI_TCW_SYNC_CTR_TRIG BIT(8) +#define ADDI_TCW_SYNC_CTR_DIS BIT(7) +#define ADDI_TCW_SYNC_CTR_ENA BIT(6) +#define ADDI_TCW_SYNC_TIMER_TRIG BIT(5) +#define ADDI_TCW_SYNC_TIMER_DISBIT(4) +#define ADDI_TCW_SYNC_TIMER_ENABIT(3) +#define ADDI_TCW_SYNC_WDOG_TRIGBIT(2) +#define ADDI_TCW_SYNC_WDOG_DIS BIT(1) +#define ADDI_TCW_SYNC_WDOG_ENA BIT(0) #define ADDI_TCW_RELOAD_REG0x04 #define ADDI_TCW_TIMEBASE_REG 0x08 #define ADDI_TCW_CTRL_REG 0x0c -#define ADDI_TCW_CTRL_EXT_CLK_STATUS (1 << 21) -#define ADDI_TCW_CTRL_CASCADE (1 << 20) -#define ADDI_TCW_CTRL_CNTR_ENA (1 << 19) -#define ADDI_TCW_CTRL_CNT_UP (1 << 18) +#define ADDI_TCW_CTRL_EXT_CLK_STATUS BIT(21) +#define ADDI_TCW_CTRL_CASCADE BIT(20) +#define ADDI_TCW_CTRL_CNTR_ENA BIT(19) +#define ADDI_TCW_CTRL_CNT_UP BIT(18) #define ADDI_TCW_CTRL_EXT_CLK(x) ((x) << 16) #define ADDI_TCW_CTRL_OUT(x) ((x) << 11) -#define ADDI_TCW_CTRL_GATE (1 << 10) -#define ADDI_TCW_CTRL_TRIG (1 << 9) +#define ADDI_TCW_CTRL_GATE BIT(10) +#define ADDI_TCW_CTRL_TRIG BIT(9) #define ADDI_TCW_CTRL_EXT_GATE(x) ((x) << 7) #define ADDI_TCW_CTRL_EXT_TRIG(x) ((x) << 5) -#define ADDI_TCW_CTRL_TIMER_ENA(1 << 4) -#define ADDI_TCW_CTRL_RESET_ENA(1 << 3) -#define ADDI_TCW_CTRL_WARN_ENA (1 << 2) -#define ADDI_TCW_CTRL_IRQ_ENA (1 << 1) -#define ADDI_TCW_CTRL_ENA (1 << 0) +#define ADDI_TCW_CTRL_TIMER_ENABIT(4) +#define ADDI_TCW_CTRL_RESET_ENABIT(3) +#define ADDI_TCW_CTRL_WARN_ENA BIT(2) +#define ADDI_TCW_CTRL_IRQ_ENA BIT(1) +#define ADDI_TCW_CTRL_ENA BIT(0) #define ADDI_TCW_STATUS_REG0x10 -#define ADDI_TCW_STATUS_SOFT_CLR (1 << 3) -#define ADDI_TCW_STATUS_SOFT_TRIG (1 << 1) -#define ADDI_TCW_STATUS_OVERFLOW (1 << 0) +#define ADDI_TCW_STATUS_SOFT_CLR BIT(3) +#define ADDI_TCW_STATUS_SOFT_TRIG BIT(1) +#define ADDI_TCW_STATUS_OVERFLOW BIT(0) #define ADDI_TCW_IRQ_REG 0x14 -#define ADDI_TCW_IRQ (1 << 0) +#define ADDI_TCW_IRQ BIT(0) #define ADDI_TCW_WARN_TIMEVAL_REG 0x18 -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/14] staging: comedi: hwdrv_apci1564: tidy up code
The hwdrv_apci1564.c file is included by the addi_apci_1564 driver to provide the support code for the timer and counter subdevices. The code in this file is broken with respect to how comedi works with subdevices. Tidy it up so that it can be fixed. H Hartley Sweeten (14): staging: comedi: addi_tcw.h: prefer using the BIT macro staging: comedi: hwdrv_apci1564: remove unused defines staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_CTRL_REG bits staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_STATUS_REG bits staging: comedi: addi_apci_1564: define the APCI1564_DO_IRQ_REG bits staging: comedi: addi_apci_1564: define the APCI1564_DI_IRQ_REG bits staging: comedi: addi_apci_1564: tidy up APCI1564_EEPROM_REG bit defines staging: comedi: hwdrv_apci1564: use addi_tcw.h defines staging: comedi: hwdrv_apci1564: tidy up apci1564_timer_insn_write() staging: comedi: hwdrv_apci1564: remove magic number in apci1564_timer_insn_read() staging: comedi: hwdrv_apci1564: remove useless code in apci1564_counter_insn_config() staging: comedi: hwdrv_apci1564: fix counter "mode" setting staging: comedi: hwdrv_apci1564: tidy up apci1564_counter_insn_write() staging: comedi: hwdrv_apci1564: remove magic numbers in apci1564_counter_insn_read() .../comedi/drivers/addi-data/hwdrv_apci1564.c | 93 +- drivers/staging/comedi/drivers/addi_apci_1564.c| 35 drivers/staging/comedi/drivers/addi_tcw.h | 63 --- 3 files changed, 93 insertions(+), 98 deletions(-) -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/14] staging: comedi: hwdrv_apci1564: remove unused defines
These defines are not used. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index fa99c8c..9c19648 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -12,11 +12,6 @@ #define APCI1564_DO_CC_INT_ENABLE 0x2 #define APCI1564_DO_CC_INT_DISABLE 0xfffd -/* TIMER COUNTER WATCHDOG DEFINES */ -#define ADDIDATA_TIMER 0 -#define ADDIDATA_COUNTER 1 -#define ADDIDATA_WATCHDOG 2 - static int apci1564_timer_insn_config(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/14] staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_CTRL_REG bits
Define the bits in this register. Remove the old defines in hwdrv_apci1564.c. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 6 -- drivers/staging/comedi/drivers/addi_apci_1564.c | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index 9c19648..42a87b7 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -6,12 +6,6 @@ #define APCI1564_DI_INT_ENABLE 0x4 #define APCI1564_DI_INT_DISABLE0xfffb -/* Digital Output Interrupt Enable Disable. */ -#define APCI1564_DO_VCC_INT_ENABLE 0x1 -#define APCI1564_DO_VCC_INT_DISABLE0xfffe -#define APCI1564_DO_CC_INT_ENABLE 0x2 -#define APCI1564_DO_CC_INT_DISABLE 0xfffd - static int apci1564_timer_insn_config(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index 33e58b9..873e329 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -81,6 +81,8 @@ #define APCI1564_DI_IRQ_REG0x10 #define APCI1564_DO_REG0x14 #define APCI1564_DO_INT_CTRL_REG 0x18 +#define APCI1564_DO_INT_CTRL_CC_INT_ENABIT(1) +#define APCI1564_DO_INT_CTRL_VCC_INT_ENA BIT(0) #define APCI1564_DO_INT_STATUS_REG 0x1c #define APCI1564_DO_IRQ_REG0x20 #define APCI1564_WDOG_REG 0x24 -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/14] staging: comedi: addi_apci_1564: define the APCI1564_DO_IRQ_REG bits
Define the bits in this register. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_1564.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index 3e8377a..2664bfa 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -87,6 +87,7 @@ #define APCI1564_DO_INT_STATUS_CC BIT(1) #define APCI1564_DO_INT_STATUS_VCC BIT(0) #define APCI1564_DO_IRQ_REG0x20 +#define APCI1564_DO_IRQ_INTR BIT(0) #define APCI1564_WDOG_REG 0x24 #define APCI1564_WDOG_RELOAD_REG 0x28 #define APCI1564_WDOG_TIMEBASE_REG 0x2c -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/14] staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_STATUS_REG bits
Define the bits in this register. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_1564.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index 873e329..3e8377a 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -84,6 +84,8 @@ #define APCI1564_DO_INT_CTRL_CC_INT_ENABIT(1) #define APCI1564_DO_INT_CTRL_VCC_INT_ENA BIT(0) #define APCI1564_DO_INT_STATUS_REG 0x1c +#define APCI1564_DO_INT_STATUS_CC BIT(1) +#define APCI1564_DO_INT_STATUS_VCC BIT(0) #define APCI1564_DO_IRQ_REG0x20 #define APCI1564_WDOG_REG 0x24 #define APCI1564_WDOG_RELOAD_REG 0x28 -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/14] staging: comedi: addi_apci_1564: tidy up APCI1564_EEPROM_REG bit defines
Use the BIT() macro to define the bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_1564.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index ae8446e..f1ccfbd 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -44,12 +44,12 @@ * 0x48 - 0x64 Timer 12-Bit */ #define APCI1564_EEPROM_REG0x00 -#define APCI1564_EEPROM_VCC_STATUS (1 << 8) +#define APCI1564_EEPROM_VCC_STATUS BIT(8) #define APCI1564_EEPROM_TO_REV(x) (((x) >> 4) & 0xf) -#define APCI1564_EEPROM_DI (1 << 3) -#define APCI1564_EEPROM_DO (1 << 2) -#define APCI1564_EEPROM_CS (1 << 1) -#define APCI1564_EEPROM_CLK(1 << 0) +#define APCI1564_EEPROM_DI BIT(3) +#define APCI1564_EEPROM_DO BIT(2) +#define APCI1564_EEPROM_CS BIT(1) +#define APCI1564_EEPROM_CLKBIT(0) #define APCI1564_REV1_TIMER_IOBASE 0x04 #define APCI1564_REV2_MAIN_IOBASE 0x04 #define APCI1564_REV2_TIMER_IOBASE 0x48 -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/14] staging: comedi: addi_apci_1564: define the APCI1564_DI_IRQ_REG bits
Define the bits in this register. Remove the old defines in hwdrv_apci1564.c. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1564.c| 8 drivers/staging/comedi/drivers/addi_apci_1564.c | 20 ++-- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index 42a87b7..0fd7705 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -1,11 +1,3 @@ -/* Digital Input IRQ Function Selection */ -#define APCI1564_DI_INT_OR (0 << 1) -#define APCI1564_DI_INT_AND(1 << 1) - -/* Digital Input Interrupt Enable Disable. */ -#define APCI1564_DI_INT_ENABLE 0x4 -#define APCI1564_DI_INT_DISABLE0xfffb - static int apci1564_timer_insn_config(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index 2664bfa..ae8446e 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -79,6 +79,8 @@ #define APCI1564_DI_INT_MODE2_REG 0x08 #define APCI1564_DI_INT_STATUS_REG 0x0c #define APCI1564_DI_IRQ_REG0x10 +#define APCI1564_DI_IRQ_ENABIT(2) +#define APCI1564_DI_IRQ_MODE BIT(1) /* 1=AND, 0=OR */ #define APCI1564_DO_REG0x14 #define APCI1564_DO_INT_CTRL_REG 0x18 #define APCI1564_DO_INT_CTRL_CC_INT_ENABIT(1) @@ -164,9 +166,9 @@ static irqreturn_t apci1564_interrupt(int irq, void *d) unsigned int chan; status = inl(dev->iobase + APCI1564_DI_IRQ_REG); - if (status & APCI1564_DI_INT_ENABLE) { + if (status & APCI1564_DI_IRQ_ENA) { /* disable the interrupt */ - outl(status & APCI1564_DI_INT_DISABLE, + outl(status & ~APCI1564_DI_IRQ_ENA, dev->iobase + APCI1564_DI_IRQ_REG); s->state = inl(dev->iobase + APCI1564_DI_INT_STATUS_REG) & @@ -305,11 +307,9 @@ static int apci1564_cos_insn_config(struct comedi_device *dev, outl(0x0, dev->iobase + APCI1564_DI_INT_MODE2_REG); break; case COMEDI_DIGITAL_TRIG_ENABLE_EDGES: - if (devpriv->ctrl != (APCI1564_DI_INT_ENABLE | - APCI1564_DI_INT_OR)) { + if (devpriv->ctrl != APCI1564_DI_IRQ_ENA) { /* switching to 'OR' mode */ - devpriv->ctrl = APCI1564_DI_INT_ENABLE | - APCI1564_DI_INT_OR; + devpriv->ctrl = APCI1564_DI_IRQ_ENA; /* wipe old channels */ devpriv->mode1 = 0; devpriv->mode2 = 0; @@ -323,11 +323,11 @@ static int apci1564_cos_insn_config(struct comedi_device *dev, devpriv->mode2 |= data[5] << shift; break; case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS: - if (devpriv->ctrl != (APCI1564_DI_INT_ENABLE | - APCI1564_DI_INT_AND)) { + if (devpriv->ctrl != (APCI1564_DI_IRQ_ENA | + APCI1564_DI_IRQ_MODE)) { /* switching to 'AND' mode */ - devpriv->ctrl = APCI1564_DI_INT_ENABLE | - APCI1564_DI_INT_AND; + devpriv->ctrl = APCI1564_DI_IRQ_ENA | + APCI1564_DI_IRQ_MODE; /* wipe old channels */ devpriv->mode1 = 0; devpriv->mode2 = 0; -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/14] staging: comedi: hwdrv_apci1564: remove magic number in apci1564_timer_insn_read()
Use the bit define from addi_tcw.h to remove the magic number. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index c4650db..a3e3a34 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -82,7 +82,8 @@ static int apci1564_timer_insn_read(struct comedi_device *dev, struct apci1564_private *devpriv = dev->private; /* Stores the status of the Timer */ - data[0] = inl(devpriv->timer + ADDI_TCW_STATUS_REG) & 0x1; + data[0] = inl(devpriv->timer + ADDI_TCW_STATUS_REG) & + ADDI_TCW_STATUS_OVERFLOW; /* Stores the Actual value of the Timer */ data[1] = inl(devpriv->timer + ADDI_TCW_VAL_REG); -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/14] staging: comedi: hwdrv_apci1564: use addi_tcw.h defines
Use the ADDI_TCW_CTRL_REG bit defines in addi_tcw.h to remove the "magic" numbers. Add some missing bit defines and mask defines to addi_tcw.h to help cleanup the code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 66 -- drivers/staging/comedi/drivers/addi_tcw.h | 14 +++-- 2 files changed, 45 insertions(+), 35 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index 0fd7705..3a02eae 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -8,15 +8,16 @@ static int apci1564_timer_insn_config(struct comedi_device *dev, devpriv->tsk_current = current; - /* First Stop The Timer */ + /* Stop the timer */ ctrl = inl(devpriv->timer + ADDI_TCW_CTRL_REG); - ctrl &= 0xf9fe; - /* Stop The Timer */ + ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | + ADDI_TCW_CTRL_ENA); outl(ctrl, devpriv->timer + ADDI_TCW_CTRL_REG); if (data[1] == 1) { /* Enable timer int & disable all the other int sources */ - outl(0x02, devpriv->timer + ADDI_TCW_CTRL_REG); + outl(ADDI_TCW_CTRL_IRQ_ENA, +devpriv->timer + ADDI_TCW_CTRL_REG); outl(0x0, dev->iobase + APCI1564_DI_IRQ_REG); outl(0x0, dev->iobase + APCI1564_DO_IRQ_REG); outl(0x0, dev->iobase + APCI1564_WDOG_IRQ_REG); @@ -40,9 +41,11 @@ static int apci1564_timer_insn_config(struct comedi_device *dev, outl(data[3], devpriv->timer + ADDI_TCW_RELOAD_REG); ctrl = inl(devpriv->timer + ADDI_TCW_CTRL_REG); - ctrl &= 0xfff719e2; - ctrl |= (2 << 13) | 0x10; - /* mode 2 */ + ctrl &= ~(ADDI_TCW_CTRL_CNTR_ENA | ADDI_TCW_CTRL_MODE_MASK | + ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | + ADDI_TCW_CTRL_TIMER_ENA | ADDI_TCW_CTRL_RESET_ENA | + ADDI_TCW_CTRL_WARN_ENA | ADDI_TCW_CTRL_ENA); + ctrl |= ADDI_TCW_CTRL_MODE(2) | ADDI_TCW_CTRL_TIMER_ENA; outl(ctrl, devpriv->timer + ADDI_TCW_CTRL_REG); return insn->n; @@ -59,11 +62,12 @@ static int apci1564_timer_insn_write(struct comedi_device *dev, ctrl = inl(devpriv->timer + ADDI_TCW_CTRL_REG); switch (data[1]) { case 0: /* Stop The Timer */ - ctrl &= 0xf9fe; + ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | + ADDI_TCW_CTRL_ENA); break; case 1: /* Enable the Timer */ - ctrl &= 0xf9ff; - ctrl |= 0x1; + ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); + ctrl |= ADDI_TCW_CTRL_ENA; break; } outl(ctrl, devpriv->timer + ADDI_TCW_CTRL_REG); @@ -99,35 +103,35 @@ static int apci1564_counter_insn_config(struct comedi_device *dev, devpriv->tsk_current = current; - /* First Stop The Counter */ - ctrl = inl(iobase + ADDI_TCW_CTRL_REG); - ctrl &= 0xf9fe; /* Stop The Timer */ + ctrl = inl(iobase + ADDI_TCW_CTRL_REG); + ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | + ADDI_TCW_CTRL_ENA); outl(ctrl, iobase + ADDI_TCW_CTRL_REG); /* Set the reload value */ outl(data[3], iobase + ADDI_TCW_RELOAD_REG); - /* Set the mode : */ - /* - Disable the hardware */ - /* - Disable the counter mode */ - /* - Disable the warning */ - /* - Disable the reset*/ - /* - Disable the timer mode */ - /* - Enable the counter mode */ - - ctrl &= 0xfffc19e2; - ctrl |= 0x8 | (data[4] << 16); + /* Set the mode */ + ctrl &= ~(ADDI_TCW_CTRL_EXT_CLK_MASK | ADDI_TCW_CTRL_MODE_MASK | + ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | + ADDI_TCW_CTRL_TIMER_ENA | ADDI_TCW_CTRL_RESET_ENA | + ADDI_TCW_CTRL_WARN_ENA | ADDI_TCW_CTRL_ENA); + ctrl |= ADDI_TCW_CTRL_CNTR_ENA | ADDI_TCW_CTRL_EXT_CLK(data[4]); outl(ctrl, iobase + ADDI_TCW_CTRL_REG); /* Enable or Disable Interrupt */ - ctrl &= 0xf9fd; - ctrl |= (data[1] << 1); + ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | + ADDI_TCW_CTRL_IRQ_ENA); + if (data[1]) + ctrl |= ADDI_TCW_CTRL_IRQ_ENA; outl(ctrl, iobase + ADDI_TCW_CTRL_REG); /* Set the Up/Down selection */ - ctrl &= 0xfffbf9ff; - ctrl |= (data[6] << 18); + ctrl &= ~(ADDI_TCW_CTRL_CNT_UP | ADDI_TCW_CTRL_GATE | + ADDI_TCW_CTRL_TRIG); + if (data[6]) + ctrl |= ADDI_TCW_CTRL_CNT_UP; outl(ctrl, iobase + ADDI_TCW_CTR
[PATCH 09/14] staging: comedi: hwdrv_apci1564: tidy up apci1564_timer_insn_write()
Clear the gate and trig bits in the common code path. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index 3a02eae..c4650db 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -60,13 +60,12 @@ static int apci1564_timer_insn_write(struct comedi_device *dev, unsigned int ctrl; ctrl = inl(devpriv->timer + ADDI_TCW_CTRL_REG); + ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); switch (data[1]) { case 0: /* Stop The Timer */ - ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | - ADDI_TCW_CTRL_ENA); + ctrl &= ~ADDI_TCW_CTRL_ENA; break; case 1: /* Enable the Timer */ - ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); ctrl |= ADDI_TCW_CTRL_ENA; break; } -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/14] staging: comedi: hwdrv_apci1564: remove useless code in apci1564_counter_insn_config()
The gate, trig, and ena, bits in the 'ctrl' are cleared at the start of the function. There is no reason clear these bits for each step. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index a3e3a34..a1f4ae1 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -114,24 +114,23 @@ static int apci1564_counter_insn_config(struct comedi_device *dev, /* Set the mode */ ctrl &= ~(ADDI_TCW_CTRL_EXT_CLK_MASK | ADDI_TCW_CTRL_MODE_MASK | - ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | ADDI_TCW_CTRL_TIMER_ENA | ADDI_TCW_CTRL_RESET_ENA | - ADDI_TCW_CTRL_WARN_ENA | ADDI_TCW_CTRL_ENA); + ADDI_TCW_CTRL_WARN_ENA); ctrl |= ADDI_TCW_CTRL_CNTR_ENA | ADDI_TCW_CTRL_EXT_CLK(data[4]); outl(ctrl, iobase + ADDI_TCW_CTRL_REG); /* Enable or Disable Interrupt */ - ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | - ADDI_TCW_CTRL_IRQ_ENA); if (data[1]) ctrl |= ADDI_TCW_CTRL_IRQ_ENA; + else + ctrl &= ~ADDI_TCW_CTRL_IRQ_ENA; outl(ctrl, iobase + ADDI_TCW_CTRL_REG); /* Set the Up/Down selection */ - ctrl &= ~(ADDI_TCW_CTRL_CNT_UP | ADDI_TCW_CTRL_GATE | - ADDI_TCW_CTRL_TRIG); if (data[6]) ctrl |= ADDI_TCW_CTRL_CNT_UP; + else + ctrl &= ~ADDI_TCW_CTRL_CNT_UP; outl(ctrl, iobase + ADDI_TCW_CTRL_REG); return insn->n; -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/14] staging: comedi: hwdrv_apci1564: fix counter "mode" setting
According to the (broken) original driver, data[4] passed to this function is the "timer mode". It appears the original code used the wrong shift to set the bits. Use the ADDI_TCW_CTRL_MODE() macro so that the correct bits get set. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index a1f4ae1..dc738b2 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -116,7 +116,7 @@ static int apci1564_counter_insn_config(struct comedi_device *dev, ctrl &= ~(ADDI_TCW_CTRL_EXT_CLK_MASK | ADDI_TCW_CTRL_MODE_MASK | ADDI_TCW_CTRL_TIMER_ENA | ADDI_TCW_CTRL_RESET_ENA | ADDI_TCW_CTRL_WARN_ENA); - ctrl |= ADDI_TCW_CTRL_CNTR_ENA | ADDI_TCW_CTRL_EXT_CLK(data[4]); + ctrl |= ADDI_TCW_CTRL_CNTR_ENA | ADDI_TCW_CTRL_MODE(data[4]); outl(ctrl, iobase + ADDI_TCW_CTRL_REG); /* Enable or Disable Interrupt */ -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/14] staging: comedi: hwdrv_apci1564: tidy up apci1564_counter_insn_write()
Clear the gate and trig bits in the common code path. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index dc738b2..1315554 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -147,16 +147,15 @@ static int apci1564_counter_insn_write(struct comedi_device *dev, unsigned int ctrl; ctrl = inl(iobase + ADDI_TCW_CTRL_REG); + ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); switch (data[1]) { case 0: /* Stops the Counter subdevice */ ctrl = 0; break; case 1: /* Start the Counter subdevice */ - ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); ctrl |= ADDI_TCW_CTRL_ENA; break; case 2: /* Clears the Counter subdevice */ - ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); ctrl |= ADDI_TCW_CTRL_GATE; break; } -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/14] staging: comedi: hwdrv_apci1564: remove magic numbers in apci1564_counter_insn_read()
Use the bit defines from addi_tcw.h to remove the magic numbers in this function. Add the missing define for ADDI_TCW_STATUS_HARDWARE_TRIG. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 8 drivers/staging/comedi/drivers/addi_tcw.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index 1315554..f0c0d58 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -178,10 +178,10 @@ static int apci1564_counter_insn_read(struct comedi_device *dev, data[0] = inl(iobase + ADDI_TCW_VAL_REG); status = inl(iobase + ADDI_TCW_STATUS_REG); - data[1] = (status >> 1) & 1;/* software trigger status */ - data[2] = (status >> 2) & 1;/* hardware trigger status */ - data[3] = (status >> 3) & 1;/* software clear status */ - data[4] = (status >> 0) & 1;/* overflow status */ + data[1] = (status & ADDI_TCW_STATUS_SOFT_TRIG) ? 1 : 0; + data[2] = (status & ADDI_TCW_STATUS_HARDWARE_TRIG) ? 1 : 0; + data[3] = (status & ADDI_TCW_STATUS_SOFT_CLR) ? 1 : 0; + data[4] = (status & ADDI_TCW_STATUS_OVERFLOW) ? 1 : 0; return insn->n; } diff --git a/drivers/staging/comedi/drivers/addi_tcw.h b/drivers/staging/comedi/drivers/addi_tcw.h index f6f0175..db6d5a4 100644 --- a/drivers/staging/comedi/drivers/addi_tcw.h +++ b/drivers/staging/comedi/drivers/addi_tcw.h @@ -49,6 +49,7 @@ #define ADDI_TCW_STATUS_REG0x10 #define ADDI_TCW_STATUS_SOFT_CLR BIT(3) +#define ADDI_TCW_STATUS_HARDWARE_TRIG BIT(2) #define ADDI_TCW_STATUS_SOFT_TRIG BIT(1) #define ADDI_TCW_STATUS_OVERFLOW BIT(0) -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCHv6 3/5] Staging: most: hdm-usb/hdm_usb.c. Fix "missing static keyword" warnings
On Fri, 7 Aug 2015 09:40:03 +0200 AdrianRemonda wrote: > On Thu, Aug 06, 2015 at 11:57:28PM +0200, Christian Gromm wrote: > > On Thu, 6 Aug 2015 19:34:58 +0200 > > Adrian Remonda wrote: > > > > > This is a patch to the most/hdm-usb/hdm_usb.c file. It > > > makes several local functions and structures static to prevent global > > > visibility. > > > > > > v6: fixed alignment with parameter list of a function. > > > > > > Signed-off-by: Adrian Remonda > > > --- > > > drivers/staging/most/hdm-usb/hdm_usb.c | 16 > > > 1 file changed, 8 insertions(+), 8 deletions(-) > > > > > > diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c > > > b/drivers/staging/most/hdm-usb/hdm_usb.c > > > index 514ce3529b7a..305303f2f17c 100644 > > > --- a/drivers/staging/most/hdm-usb/hdm_usb.c > > > +++ b/drivers/staging/most/hdm-usb/hdm_usb.c > > > @@ -290,7 +290,7 @@ static unsigned int get_stream_frame_size(struct > > > most_channel_config *cfg) > > > * > > > * Returns 0 on success or error code otherwise. > > > */ > > > -int hdm_poison_channel(struct most_interface *iface, int channel) > > > +static int hdm_poison_channel(struct most_interface *iface, int channel) > > > { > > > struct most_dev *mdev; > > > > > > @@ -328,7 +328,7 @@ int hdm_poison_channel(struct most_interface *iface, > > > int channel) > > > * This inserts the INIC hardware specific padding bytes into a streaming > > > * channel's buffer > > > */ > > > -int hdm_add_padding(struct most_dev *mdev, int channel, struct mbo *mbo) > > > +static int hdm_add_padding(struct most_dev *mdev, int channel, struct > > > mbo *mbo) > > > { > > > struct most_channel_config *conf = &mdev->conf[channel]; > > > unsigned int j, num_frames, frame_size; > > > @@ -365,7 +365,7 @@ int hdm_add_padding(struct most_dev *mdev, int > > > channel, struct mbo *mbo) > > > * This takes the INIC hardware specific padding bytes off a streaming > > > * channel's buffer. > > > */ > > > -int hdm_remove_padding(struct most_dev *mdev, int channel, struct mbo > > > *mbo) > > > +static int hdm_remove_padding(struct most_dev *mdev, int channel, struct > > > mbo *mbo) > > > { > > > unsigned int j, num_frames, frame_size; > > > struct most_channel_config *const conf = &mdev->conf[channel]; > > > @@ -644,7 +644,7 @@ static void hdm_read_completion(struct urb *urb) > > > * > > > * Context: Could in _some_ cases be interrupt! > > > */ > > > -int hdm_enqueue(struct most_interface *iface, int channel, struct mbo > > > *mbo) > > > +static int hdm_enqueue(struct most_interface *iface, int channel, struct > > > mbo *mbo) > > > { > > > struct most_dev *mdev; > > > struct buf_anchor *anchor; > > > @@ -743,8 +743,8 @@ _error: > > > * @channel: channel ID > > > * @conf: structure that holds the configuration information > > > */ > > > -int hdm_configure_channel(struct most_interface *iface, int channel, > > > - struct most_channel_config *conf) > > > +static int hdm_configure_channel(struct most_interface *iface, int > > > channel, > > > + struct most_channel_config *conf) > > > > Again, please keep the original alignment and start the second line > > of function arguments right beneath the first argument or else this > > function will be different from others. > > > > Thanks, > > Chris > > Hello Christian, > > Whith the patch applied on my tree this looks properly aligned. Could you > double check? I did. My client somehow messed it up. Got it fixed... Sorry for the confusion, Chris > > regards, > Adrian > > > > > > { > > > unsigned int num_frames; > > > unsigned int frame_size; > > > @@ -824,7 +824,7 @@ exit: > > > * This triggers the USB vendor requests to read the hardware address and > > > * the current link status of the attached device. > > > */ > > > -int hdm_update_netinfo(struct most_dev *mdev) > > > +static int hdm_update_netinfo(struct most_dev *mdev) > > > { > > > struct device *dev = &mdev->usb_device->dev; > > > int i; > > > @@ -873,7 +873,7 @@ int hdm_update_netinfo(struct most_dev *mdev) > > > * polls for the NI state of the INIC every 2 seconds. > > > * > > > */ > > > -void hdm_request_netinfo(struct most_interface *iface, int channel) > > > +static void hdm_request_netinfo(struct most_interface *iface, int > > > channel) > > > { > > > struct most_dev *mdev; > > > > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] ion: Handle the memory mapping correctly on x86
On 08/03/2015 05:21 PM, Radhakrishna, Pradeep wrote: From b4069e7fe1b2aa1660b3f944e246c13b4947db21 Mon Sep 17 00:00:00 2001 From: Zhebin Jin Date: Wed, 8 Jul 2015 10:35:06 +0800 Subject: [PATCH] ion: Handle the memory mapping correctly on x86 This patch modifies the ion page pool code to address limitation in x86 PAT. That is, when one physical page is mapped to multiple virtual pages, the same cache policy should be used. So there is a need to add set_memory_wc/uc call to avoid aliases. Otherwise, all mappings will be cached(write back), no matter which cache policy is choosed to do the mapping. I haven't looked at other x86 code much before, how is this case handled elsewhere? Can you also cite a specification or document where this is necessary? I know alias mappings are documented in the ARM ARM. Signed-off-by: Zhebin Jin Signed-off-by: Pradeep Radhakrishna --- drivers/staging/android/ion/ion_page_pool.c | 33 ++--- drivers/staging/android/ion/ion_priv.h|2 +- drivers/staging/android/ion/ion_system_heap.c |5 ++-- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index 0e20e62..566946b 100644 --- a/drivers/staging/android/ion/ion_page_pool.c +++ b/drivers/staging/android/ion/ion_page_pool.c @@ -21,6 +21,11 @@ #include #include #include + +#if defined(CONFIG_X86) +#include +#endif + #include "ion_priv.h" struct ion_page_pool_item { @@ -34,6 +39,16 @@ static void *ion_page_pool_alloc_pages(struct ion_page_pool *pool) if (!page) return NULL; + +#if defined(CONFIG_X86) + { + void *va = page_address(page); + + if (va) + set_memory_wc((unsigned long)va, 1 << pool->order); + } +#endif + ion_pages_sync_for_device(NULL, page, PAGE_SIZE << pool->order, DMA_BIDIRECTIONAL); return page; @@ -42,6 +57,15 @@ static void *ion_page_pool_alloc_pages(struct ion_page_pool *pool) static void ion_page_pool_free_pages(struct ion_page_pool *pool, struct page *page) { +#if defined(CONFIG_X86) + { + void *va = page_address(page); + + if (va) + set_memory_wb((unsigned long)va, 1 << pool->order); + } +#endif + __free_pages(page, pool->order); } @@ -108,11 +132,14 @@ void *ion_page_pool_alloc(struct ion_page_pool *pool) return page; } -void ion_page_pool_free(struct ion_page_pool *pool, struct page *page) +void ion_page_pool_free(struct ion_page_pool *pool, struct page *page, + bool skip_pool) { - int ret; + int ret = -ENOMEM; + + if (!skip_pool) + ret = ion_page_pool_add(pool, page); - ret = ion_page_pool_add(pool, page); if (ret) ion_page_pool_free_pages(pool, page); } diff --git a/drivers/staging/android/ion/ion_priv.h b/drivers/staging/android/ion/ion_priv.h index 7c06e2e..ac635bcb 100644 --- a/drivers/staging/android/ion/ion_priv.h +++ b/drivers/staging/android/ion/ion_priv.h @@ -379,7 +379,7 @@ struct ion_page_pool { struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned int order); void ion_page_pool_destroy(struct ion_page_pool *); void *ion_page_pool_alloc(struct ion_page_pool *); -void ion_page_pool_free(struct ion_page_pool *, struct page *); +void ion_page_pool_free(struct ion_page_pool *, struct page *, bool skip_pool); /** ion_page_pool_shrink - shrinks the size of the memory cached in the pool * @pool: the pool diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index 5945445..7bef39d 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -91,10 +91,11 @@ static void free_buffer_page(struct ion_system_heap *heap, { bool cached = ion_buffer_cached(buffer); - if (!cached && !(buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE)) { + if (!cached) { struct ion_page_pool *pool = heap->pools[order_to_index(order)]; - ion_page_pool_free(pool, page); + ion_page_pool_free(pool, page, buffer->private_flags & + ION_PRIV_FLAG_SHRINKER_FREE); } else { __free_pages(page, order); } Can you split the change to ion_page_pool_free into a separate patch? It's not clear what that has to do with correct memory mapping. Thanks, Laura ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[GIT PULL] Staging driver fixes for 4.2-rc6
The following changes since commit cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f: Linux 4.2-rc4 (2015-07-26 12:26:21 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ tags/staging-4.2-rc6 for you to fetch changes up to fb1de5a4c825a389f054cc3803e06116d2fbdc7e: staging: lustre: Include unaligned.h instead of access_ok.h (2015-08-04 22:13:25 -0700) Staging driver fixes for 4.2-rc6 Here are 3 bugfixes for some staging driver issues that have been reported. All have been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman Guenter Roeck (1): staging: lustre: Include unaligned.h instead of access_ok.h H Hartley Sweeten (1): staging: comedi: das1800: add missing break in switch Malcolm Priestley (1): staging: vt6655: vnt_bss_info_changed check conf->beacon_rate is not NULL drivers/staging/comedi/drivers/das1800.c | 1 + drivers/staging/lustre/lustre/obdclass/debug.c | 2 +- drivers/staging/vt6655/device_main.c | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 03/14] staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_CTRL_REG bits
On Fri, Aug 07, 2015 at 11:45:03AM -0700, H Hartley Sweeten wrote: > Define the bits in this register. Remove the old defines in hwdrv_apci1564.c. > > Signed-off-by: H Hartley Sweeten > Cc: Ian Abbott > Cc: Greg Kroah-Hartman > --- The #defines that are introduced in this patch and the next 2 patches are not being used anywhere, even after the whole series is applied. Then why having them now? someone else will can a patch to clean the unused defines. regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: media: davinci_vpfe: Fix over 80 characters coding style issue
This is a patch to the dm365_ipipe.c that fixes over 80 characters warning detected. Signed-off-by: Junsu Shin --- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 1bbb90c..a474adf 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -1536,8 +1536,9 @@ ipipe_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, * @fse: pointer to v4l2_subdev_frame_size_enum structure. */ static int -ipipe_enum_frame_size(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, - struct v4l2_subdev_frame_size_enum *fse) +ipipe_enum_frame_size(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_frame_size_enum *fse) { struct vpfe_ipipe_device *ipipe = v4l2_get_subdevdata(sd); struct v4l2_mbus_framefmt format; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Staging: media: davinci_vpfe: fix over 80 characters coding style issue.
On 08/06/2015 11:45 PM, Sudip Mukherjee wrote: > On Thu, Aug 06, 2015 at 09:55:54PM -0500, Junsu Shin wrote: >> This is a patch to the dm365_ipipe.c that fixes over 80 characters warning >> detected by checkpatch.pl. >> Signed-off-by: Junsu Shin > please do not use whitespace before Signed-off-by: line. >> >> --- >> drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c >> b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c >> index 1bbb90c..57cd274 100644 >> --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c >> +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c >> @@ -1536,8 +1536,9 @@ ipipe_get_format(struct v4l2_subdev *sd, struct >> v4l2_subdev_pad_config *cfg, >> * @fse: pointer to v4l2_subdev_frame_size_enum structure. >> */ >> static int >> -ipipe_enum_frame_size(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config >> *cfg, >> - struct v4l2_subdev_frame_size_enum *fse) >> +ipipe_enum_frame_size(struct v4l2_subdev *sd, >> +struct v4l2_subdev_pad_config *cfg, >> +struct v4l2_subdev_frame_size_enum *fse) > since you are modifying this line, please fix up the indention also. > > regards > sudip > Thanks for pointing it out. Again, this is a patch to the dm365_ipipe.c that fixes over 80 characters warning detected by the script. This time I fixed up the indentation issue claimed in the previous one. Signed-off-by: Junsu Shin --- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 1bbb90c..a474adf 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -1536,8 +1536,9 @@ ipipe_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, * @fse: pointer to v4l2_subdev_frame_size_enum structure. */ static int -ipipe_enum_frame_size(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, - struct v4l2_subdev_frame_size_enum *fse) +ipipe_enum_frame_size(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_frame_size_enum *fse) { struct vpfe_ipipe_device *ipipe = v4l2_get_subdevdata(sd); struct v4l2_mbus_framefmt format; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel