Re: [PATCH v3] staging: netlogic: Fixed alignment of parentheseis checkpatch warning
On Sat, 19 Mar 2016 19:22:09 -0700, Joe Perches said: > On Sun, 2016-03-20 at 07:48 +0530, Parth Sane wrote: > > Hi, > > Thanks for pointing out that the changes have been done. Nevertheless > > this was a good learning exercise. How do I check which changes have > > already been done? > > Use this tree: > > http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git And note that doing a 'git clone' of this won't do what you want.. What you *want* to do: $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git $ git remote add linux-next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git $ git fetch --tags linux-next This will get you a tree that you can actually work with... ... # later on (linux-next is updated most weekdays) $ git remote update to find out what the current tree looks like. You do *not* want to use 'git pull' against linux-next because it rebases every night pgpwqRLrDiv5V.pgp Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/5] staging: rtl8712: Fixed Multiple FSF address checkpatch warnings
On Sunday, March 20, 2016 11:12:32 PM Parth Sane wrote: > > Fixed Multiple FSF address checkpatch warnings to conform to kernel coding > > style. > > > > Parth Sane (5): > > staging: rtl8712: Fixed FSF address warning in basic_types.h > > staging: rtl8712: Fixed FSF address warning in drv_types.h > > staging: rtl9712: Fixed FSF address warning in ethernet.h > > staging: rtl9712: Fixed FSF address warning in hal_init.c > > staging: rtl9712: Fixed FSF address warning in ieee80211.c > > > > drivers/staging/rtl8712/basic_types.h | 4 > > drivers/staging/rtl8712/drv_types.h | 4 > > drivers/staging/rtl8712/ethernet.h| 4 > > drivers/staging/rtl8712/hal_init.c| 4 > > drivers/staging/rtl8712/ieee80211.c | 4 > > 5 files changed, 20 deletions(-) > > > > -- > > 1.9.1 > Hi, > The thing is all these patches are related and have a cover letter explaining > changes. But this seems to be a trivial change which is self explanatory. > This should possibly suffice. What do you think? > Regards, > Parth Sane The cover letter does not end up in the repository. A cover letter can be helpful, but is not required. You MUST, however add a descriptive commit message to each patch for them to be accepted into the kernel. See Documentation/SubmittingPatches in the kernel sources. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: wlan-ng: removed "goto " instructions where this is not necessary.
This patch removes "goto " instructions which do only a return. In this way, aditional instructions were removed. Signed-off-by: Claudiu Beznea--- drivers/staging/wlan-ng/cfg80211.c | 112 + 1 file changed, 39 insertions(+), 73 deletions(-) diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index 8bad018..63d7c99 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -62,7 +62,6 @@ static int prism2_result2err(int prism2_result) err = -EOPNOTSUPP; break; default: - err = 0; break; } @@ -111,13 +110,13 @@ static int prism2_change_virtual_intf(struct wiphy *wiphy, switch (type) { case NL80211_IFTYPE_ADHOC: if (wlandev->macmode == WLAN_MACMODE_IBSS_STA) - goto exit; + return err; wlandev->macmode = WLAN_MACMODE_IBSS_STA; data = 0; break; case NL80211_IFTYPE_STATION: if (wlandev->macmode == WLAN_MACMODE_ESS_STA) - goto exit; + return err; wlandev->macmode = WLAN_MACMODE_ESS_STA; data = 1; break; @@ -136,7 +135,6 @@ static int prism2_change_virtual_intf(struct wiphy *wiphy, dev->ieee80211_ptr->iftype = type; -exit: return err; } @@ -146,9 +144,7 @@ static int prism2_add_key(struct wiphy *wiphy, struct net_device *dev, { wlandevice_t *wlandev = dev->ml_priv; u32 did; - - int err = 0; - int result = 0; + int result; switch (params->cipher) { case WLAN_CIPHER_SUITE_WEP40: @@ -157,7 +153,7 @@ static int prism2_add_key(struct wiphy *wiphy, struct net_device *dev, DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, key_index); if (result) - goto exit; + return -EFAULT; /* send key to driver */ switch (key_index) { @@ -178,26 +174,22 @@ static int prism2_add_key(struct wiphy *wiphy, struct net_device *dev, break; default: - err = -EINVAL; - goto exit; + return -EINVAL; } result = prism2_domibset_pstr32(wlandev, did, params->key_len, params->key); if (result) - goto exit; + return -EFAULT; + break; default: pr_debug("Unsupported cipher suite\n"); - result = 1; + return -EFAULT; } -exit: - if (result) - err = -EFAULT; - - return err; + return 0; } static int prism2_get_key(struct wiphy *wiphy, struct net_device *dev, @@ -235,8 +227,7 @@ static int prism2_del_key(struct wiphy *wiphy, struct net_device *dev, { wlandevice_t *wlandev = dev->ml_priv; u32 did; - int err = 0; - int result = 0; + int result; /* There is no direct way in the hardware (AFAIK) of removing * a key, so we will cheat by setting the key to a bogus value @@ -265,35 +256,30 @@ static int prism2_del_key(struct wiphy *wiphy, struct net_device *dev, break; default: - err = -EINVAL; - goto exit; + return -EINVAL; } result = prism2_domibset_pstr32(wlandev, did, 13, "0"); - -exit: if (result) - err = -EFAULT; + return -EFAULT; - return err; + return 0; } static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev, u8 key_index, bool unicast, bool multicast) { wlandevice_t *wlandev = dev->ml_priv; - - int err = 0; - int result = 0; + int result; result = prism2_domibset_uint32(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, key_index); if (result) - err = -EFAULT; + return -EFAULT; - return err; + return 0; } static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, @@ -451,7 +437,6 @@ static int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) wlandevice_t *wlandev = priv->wlandev; u32 data; int result; - int err = 0; if (changed & WIPHY_PARAM_RTS_THRESHOLD) { if (wiphy->rts_threshold == -1) @@ -462,10 +447,8 @@ static int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) result =
[PATCH] rtl8192u: fix typo in debug message
This fixes a mis-spelled word in a few debug statements. Signed-off-by: Nik Nyby--- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c index f18fc0b..051c2be 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c @@ -746,7 +746,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee, // Indicate packets if(index>REORDER_WIN_SIZE){ - IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorer buffer full!! \n"); + IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorder buffer full!! \n"); kfree(prxbIndicateArray); return; } diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c index 148d0d4..6033502 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c @@ -75,7 +75,7 @@ static void RxPktPendingTimeout(unsigned long data) // Indicate packets if(index > REORDER_WIN_SIZE){ - IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorer buffer full!! \n"); + IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorder buffer full!! \n"); spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags); return; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 1/1] scsi: storvsc: Support manual scan of FC hosts on Hyper-V
> -Original Message- > From: James Bottomley [mailto:james.bottom...@hansenpartnership.com] > Sent: Friday, March 18, 2016 3:41 PM > To: KY Srinivasan; Martin K. Petersen > > Cc: Christoph Hellwig ; gre...@linuxfoundation.org; > linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; > oher...@suse.com; jbottom...@parallels.com; linux-s...@vger.kernel.org; > a...@canonical.com; vkuzn...@redhat.com; jasow...@redhat.com; > h...@suse.de > Subject: Re: [PATCH 1/1] scsi: storvsc: Support manual scan of FC hosts on > Hyper-V > > On Thu, 2016-03-17 at 00:01 +, KY Srinivasan wrote: > > The only attributes I would be interested are: > > 1) node name > > 2) port name > > > > Ideally, if this can show under /sys/class/fc_host/hostx/port_name > > and node_name, > > it will be ideal since all user scripts can work. > > OK, like this? Yes; thank you very much James. Looking at the patch though, it may be an overkill considering how much of the code is duplicated. The current fc transport class does give us the flexibility to control the attributes we want to surface (fc_function_template). In any case I will test this code and get back to you soon. Regards, K. Y > > From 7af7c428e7e04ddcc87fda12d6571e3dff8ae024 Mon Sep 17 00:00:00 > 2001 > From: James Bottomley > Date: Fri, 18 Mar 2016 15:35:45 -0700 > Subject: scsi_transport_fc: introduce lightweight class for virtualization > systems > > The FC transport class is very heavily tilted towards helping things > which operate a fabric (as it should be). However, there seems to be > a need for a lightweight version for use in virtual systems that > simply want to show pass through FC information without making any use > of the heavyweight functions. This is an attempt to give them what > they want: the lightweight class has no vports or rports and only two > host attributes. Essentially, it's designed for the HV storvsc > driver, but if other virtualizataion systems have similar problems, we > can add more attributes. > > Signed-off-by: James Bottomley > --- > drivers/scsi/scsi_transport_fc.c | 94 > > include/scsi/scsi_transport_fc.h | 3 ++ > 2 files changed, 97 insertions(+) > > diff --git a/drivers/scsi/scsi_transport_fc.c > b/drivers/scsi/scsi_transport_fc.c > index 8a88226..a9fcb4d 100644 > --- a/drivers/scsi/scsi_transport_fc.c > +++ b/drivers/scsi/scsi_transport_fc.c > @@ -351,6 +351,27 @@ struct fc_internal { > > #define to_fc_internal(tmpl) container_of(tmpl, struct fc_internal, t) > > +#define FC_LW_HOST_NUM_ATTRS 2 > +struct fc_lw_internal { > + struct scsi_transport_template t; > + struct fc_function_template *f; > + > + /* > + * For attributes : each object has : > + * An array of the actual attributes structures > + * An array of null-terminated pointers to the attribute > + * structures - used for mid-layer interaction. > + * > + * The attribute containers for the starget and host are are > + * part of the midlayer. As the remote port is specific to the > + * fc transport, we must provide the attribute container. > + */ > + struct device_attribute > private_host_attrs[FC_LW_HOST_NUM_ATTRS]; > + struct device_attribute *host_attrs[FC_LW_HOST_NUM_ATTRS + 1]; > +}; > + > +#define to_fc_lw_internal(tmpl) container_of(tmpl, struct > fc_lw_internal, t) > + > static int fc_target_setup(struct transport_container *tc, struct device > *dev, > struct device *cdev) > { > @@ -472,6 +493,12 @@ static int fc_host_remove(struct transport_container > *tc, struct device *dev, > return 0; > } > > +static DECLARE_TRANSPORT_CLASS(fc_lw_host_class, > +"fc_host", > +NULL, > +NULL, > +NULL); > + > static DECLARE_TRANSPORT_CLASS(fc_host_class, > "fc_host", > fc_host_setup, > @@ -1968,6 +1995,25 @@ static int fc_host_match(struct > attribute_container *cont, > return >t.host_attrs.ac == cont; > } > > +static int fc_lw_host_match(struct attribute_container *cont, > + struct device *dev) > +{ > + struct Scsi_Host *shost; > + struct fc_lw_internal *i; > + > + if (!scsi_is_host_device(dev)) > + return 0; > + > + shost = dev_to_shost(dev); > + if (!shost->transportt || shost->transportt->host_attrs.ac.class > + != _lw_host_class.class) > + return 0; > + > + i = to_fc_lw_internal(shost->transportt); > + > + return >t.host_attrs.ac == cont; > +} > + > static int fc_target_match(struct attribute_container *cont, > struct device *dev) > { > @@ -2171,6 +2217,54 @@ static
Re: [PATCH 0/5] staging: rtl8712: Fixed Multiple FSF address checkpatch warnings
> Fixed Multiple FSF address checkpatch warnings to conform to kernel coding > style. > > Parth Sane (5): > staging: rtl8712: Fixed FSF address warning in basic_types.h > staging: rtl8712: Fixed FSF address warning in drv_types.h > staging: rtl9712: Fixed FSF address warning in ethernet.h > staging: rtl9712: Fixed FSF address warning in hal_init.c > staging: rtl9712: Fixed FSF address warning in ieee80211.c > > drivers/staging/rtl8712/basic_types.h | 4 > drivers/staging/rtl8712/drv_types.h | 4 > drivers/staging/rtl8712/ethernet.h| 4 > drivers/staging/rtl8712/hal_init.c| 4 > drivers/staging/rtl8712/ieee80211.c | 4 > 5 files changed, 20 deletions(-) > > -- > 1.9.1 Hi, The thing is all these patches are related and have a cover letter explaining changes. But this seems to be a trivial change which is self explanatory. This should possibly suffice. What do you think? Regards, Parth Sane signature.asc Description: Message signed with OpenPGP using GPGMail ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/5] staging: rtl8712: Fixed Multiple FSF address checkpatch warnings
On Sun, Mar 20, 2016 at 1:28 PM, Parth Sanewrote: > *** BLURB HERE *** > > Parth Sane (5): > staging: rtl8712: Fixed FSF address warning in basic_types.h > staging: rtl8712: Fixed FSF address warning in drv_types.h > staging: rtl9712: Fixed FSF address warning in ethernet.h > staging: rtl9712: Fixed FSF address warning in hal_init.c > staging: rtl9712: Fixed FSF address warning in ieee80211.c > > drivers/staging/rtl8712/basic_types.h | 4 > drivers/staging/rtl8712/drv_types.h | 4 > drivers/staging/rtl8712/ethernet.h| 4 > drivers/staging/rtl8712/hal_init.c| 4 > drivers/staging/rtl8712/ieee80211.c | 4 > 5 files changed, 20 deletions(-) > > -- > 1.9.1 > > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel It looks like all the patches in this set do not contain a commit log in the body. It's up to the maintainer but I'm fairly certain they won't be accepted without a body. On Sun, Mar 20, 2016 at 1:32 PM, Parth Sane wrote: > Fixed Multiple FSF address checkpatch warnings to conform to kernel coding > style. > > Parth Sane (5): > staging: rtl8712: Fixed FSF address warning in basic_types.h > staging: rtl8712: Fixed FSF address warning in drv_types.h > staging: rtl9712: Fixed FSF address warning in ethernet.h > staging: rtl9712: Fixed FSF address warning in hal_init.c > staging: rtl9712: Fixed FSF address warning in ieee80211.c > > drivers/staging/rtl8712/basic_types.h | 4 > drivers/staging/rtl8712/drv_types.h | 4 > drivers/staging/rtl8712/ethernet.h| 4 > drivers/staging/rtl8712/hal_init.c| 4 > drivers/staging/rtl8712/ieee80211.c | 4 > 5 files changed, 20 deletions(-) > > -- > 1.9.1 > > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()
Drivers, especially i915.ko, can fail during the initial migration of a dma-buf for CPU access. However, the error code from the driver was not being propagated back to ioctl and so userspace was blissfully ignorant of the failure. Rendering corruption ensues. Whilst fixing the ioctl to return the error code from dma_buf_start_cpu_access(), also do the same for dma_buf_end_cpu_access(). For most drivers, dma_buf_end_cpu_access() cannot fail. i915.ko however, as most drivers would, wants to avoid being uninterruptible (as would be required to guarrantee no failure when flushing the buffer to the device). As userspace already has to handle errors from the SYNC_IOCTL, take advantage of this to be able to restart the syscall across signals. This fixes a coherency issue for i915.ko as well as reducing the uninterruptible hold upon its BKL, the struct_mutex. Fixes commit c11e391da2a8fe973c3c2398452000bed505851e Author: Daniel VetterDate: Thu Feb 11 20:04:51 2016 -0200 dma-buf: Add ioctls to allow userspace to flush Testcase: igt/gem_concurrent_blit/*dmabuf*interruptible Testcase: igt/prime_mmap_coherency/ioctl-errors Signed-off-by: Chris Wilson Cc: Tiago Vignatti Cc: Stéphane Marchesin Cc: David Herrmann Cc: Sumit Semwal Cc: Daniel Vetter CC: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Cc: linaro-mm-...@lists.linaro.org Cc: intel-...@lists.freedesktop.org Cc: de...@driverdev.osuosl.org --- drivers/dma-buf/dma-buf.c | 17 +++-- drivers/gpu/drm/i915/i915_gem_dmabuf.c| 15 +-- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 5 +++-- drivers/gpu/drm/udl/udl_fb.c | 4 ++-- drivers/staging/android/ion/ion.c | 6 -- include/linux/dma-buf.h | 6 +++--- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 9810d1df0691..774a60f4309a 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -259,6 +259,7 @@ static long dma_buf_ioctl(struct file *file, struct dma_buf *dmabuf; struct dma_buf_sync sync; enum dma_data_direction direction; + int ret; dmabuf = file->private_data; @@ -285,11 +286,11 @@ static long dma_buf_ioctl(struct file *file, } if (sync.flags & DMA_BUF_SYNC_END) - dma_buf_end_cpu_access(dmabuf, direction); + ret = dma_buf_end_cpu_access(dmabuf, direction); else - dma_buf_begin_cpu_access(dmabuf, direction); + ret = dma_buf_begin_cpu_access(dmabuf, direction); - return 0; + return ret; default: return -ENOTTY; } @@ -613,13 +614,17 @@ EXPORT_SYMBOL_GPL(dma_buf_begin_cpu_access); * * This call must always succeed. */ -void dma_buf_end_cpu_access(struct dma_buf *dmabuf, - enum dma_data_direction direction) +int dma_buf_end_cpu_access(struct dma_buf *dmabuf, + enum dma_data_direction direction) { + int ret = 0; + WARN_ON(!dmabuf); if (dmabuf->ops->end_cpu_access) - dmabuf->ops->end_cpu_access(dmabuf, direction); + ret = dmabuf->ops->end_cpu_access(dmabuf, direction); + + return ret; } EXPORT_SYMBOL_GPL(dma_buf_end_cpu_access); diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c index 1f3eef6fb345..0506016e18e0 100644 --- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c +++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c @@ -228,25 +228,20 @@ static int i915_gem_begin_cpu_access(struct dma_buf *dma_buf, enum dma_data_dire return ret; } -static void i915_gem_end_cpu_access(struct dma_buf *dma_buf, enum dma_data_direction direction) +static int i915_gem_end_cpu_access(struct dma_buf *dma_buf, enum dma_data_direction direction) { struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); struct drm_device *dev = obj->base.dev; - struct drm_i915_private *dev_priv = to_i915(dev); - bool was_interruptible; int ret; - mutex_lock(>struct_mutex); - was_interruptible = dev_priv->mm.interruptible; - dev_priv->mm.interruptible = false; + ret = i915_mutex_lock_interruptible(dev); + if (ret) + return ret; ret = i915_gem_object_set_to_gtt_domain(obj, false); - - dev_priv->mm.interruptible = was_interruptible; mutex_unlock(>struct_mutex); - if (unlikely(ret)) - DRM_ERROR("unable to flush buffer following CPU access; rendering may be corrupt\n"); + return ret; } static const struct dma_buf_ops i915_dmabuf_ops = { diff
Re: [PATCH] staging: rtl8712: Fixed Multiple Parenthesis Alignment
> On 20-Mar-2016, at 10:03 PM, Roger H Newellwrote: > > > On Mar 20, 2016 1:21 PM, "Parth Sane" wrote: > > > > > > > On 20-Mar-2016, at 9:18 PM, Joe Perches wrote: > > > > > > On Sun, 2016-03-20 at 14:33 +, Parth Sane wrote: > > >> Fixed multiple parenthesis alignment warnings. > > >> Signed-off-by: Parth Sane > > > > > > Please always add a blank line after your changelog and > > > before your "Signed-off-by:" line > > > > > >> diff --git a/drivers/staging/rtl8712/hal_init.c > > >> b/drivers/staging/rtl8712/hal_init.c > > > [] > > >> @@ -197,7 +197,7 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter) > > >> 0x); > > >> memcpy(ppayload, ptr, dump_imem_sz); > > >> r8712_write_mem(padapter, RTL8712_DMA_VOQ, > > >> - dump_imem_sz + TXDESC_SIZE, > > >> +dump_imem_sz + TXDESC_SIZE, > > >>(u8 *)ptx_desc); > > > > > > Please align all lines of multi-line statements. > > > > > > checkpatch is a stupid little script. > > > You have to make sure your own patches are sensible. > > > > > > There are several things you should read and > > > understand in the Documentation directory. > > > > > > Documentation/CodingStyle > > > Documentation/SubmittingPatches > > > Documentation/SubmitChecklist > > > > > > Fixing checkpatch messages is sometimes a decent > > > way to understand this process, but the patches > > > that can be generated fixing these messages tend > > > to have low overall value. > > > > > > After doing a few of these, please move on to > > > some part of the kernel that interests you and > > > submit new code or start to fix actual defects. > > > > > > Maybe if you are interested in wireless drivers, > > > buy a NIC that isn't supported by the mac80211 > > > drivers and adapt the existing staging driver for > > > that variant. > > > > > > Code, test, validate, submit, repeat... > > > > > Hi, > > I’m first trying my hands at easy stuff before I actually move on to more > > difficult stuff. I will surely look in that direction. Thanks for your > > valuable inputs. > > Regards, > > Parth Sane > > > > ___ > > devel mailing list > > de...@linuxdriverproject.org > > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel > > > > www.kernelnewbies.org is an excellent resource for getting started. Check out > the first patch tutorial, it walks you through all the basics of creating and > sending a properly formated patch. You're better off learning to do it right > the first time, if its not right the patch simply won't be accepted and > you'll have to redo it anyway. Take some time to go through the tutorial I > mentioned. Good luck > > Roger H. Newell > Hi Roger, Thanks for your comments. I’ve correctly submitted a patchset for the multiple FSF notices, maybe you can comment if its any good?. I’m through the rough patch and now understand the process now quite fairly. I did checkout kernelnewbies.org before I submitted the patch, but alas I needed some practical XP. Regards, Parth Sane signature.asc Description: Message signed with OpenPGP using GPGMail ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8712: Removed copyright notice
On Sun, 2016-03-20 at 03:32 +, Parth Sane wrote: > Removed copyright notice as per checkpatch check warning. This is not a good patch subject nor commit message. Removing copyright is a serious thing. You are not doing that. You are removing a paragraph about an organization's address that is subject to change. Please be more thoughtful about what you are actually doing when writing your commit subject lines and messages. > Signed-off-by: Parth Sane> > --- > drivers/staging/rtl8712/drv_types.h | 4 > 1 file changed, 4 deletions(-) > > diff --git a/drivers/staging/rtl8712/drv_types.h > b/drivers/staging/rtl8712/drv_types.h > index 29e47e1..ae79047 100644 > --- a/drivers/staging/rtl8712/drv_types.h > +++ b/drivers/staging/rtl8712/drv_types.h > @@ -11,10 +11,6 @@ > * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > * more details. > * > - * You should have received a copy of the GNU General Public License along > with > - * this program; if not, write to the Free Software Foundation, Inc., > - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA > - * > * Modifications for inclusion into the Linux staging tree are > * Copyright(c) 2010 Larry Finger. All rights reserved. > * ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/5] staging: rtl9712: Fixed FSF address warning in ieee80211.c
Signed-off-by: Parth Sane--- drivers/staging/rtl8712/ieee80211.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c index d13b4d5..8918654 100644 --- a/drivers/staging/rtl8712/ieee80211.c +++ b/drivers/staging/rtl8712/ieee80211.c @@ -13,10 +13,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/5] staging: rtl9712: Fixed FSF address warning in hal_init.c
Signed-off-by: Parth Sane--- drivers/staging/rtl8712/hal_init.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index 17d2b5f..afa7fe78 100644 --- a/drivers/staging/rtl8712/hal_init.c +++ b/drivers/staging/rtl8712/hal_init.c @@ -13,10 +13,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/5] staging: rtl9712: Fixed FSF address warning in ethernet.h
Signed-off-by: Parth Sane--- drivers/staging/rtl8712/ethernet.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/ethernet.h b/drivers/staging/rtl8712/ethernet.h index fad173f..039da36 100644 --- a/drivers/staging/rtl8712/ethernet.h +++ b/drivers/staging/rtl8712/ethernet.h @@ -11,10 +11,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/5] staging: rtl8712: Fixed FSF address warning in drv_types.h
Signed-off-by: Parth Sane--- drivers/staging/rtl8712/drv_types.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/drv_types.h b/drivers/staging/rtl8712/drv_types.h index 29e47e1..ae79047 100644 --- a/drivers/staging/rtl8712/drv_types.h +++ b/drivers/staging/rtl8712/drv_types.h @@ -11,10 +11,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/5] staging: rtl8712: Fixed Multiple FSF address checkpatch warnings
*** BLURB HERE *** Parth Sane (5): staging: rtl8712: Fixed FSF address warning in basic_types.h staging: rtl8712: Fixed FSF address warning in drv_types.h staging: rtl9712: Fixed FSF address warning in ethernet.h staging: rtl9712: Fixed FSF address warning in hal_init.c staging: rtl9712: Fixed FSF address warning in ieee80211.c drivers/staging/rtl8712/basic_types.h | 4 drivers/staging/rtl8712/drv_types.h | 4 drivers/staging/rtl8712/ethernet.h| 4 drivers/staging/rtl8712/hal_init.c| 4 drivers/staging/rtl8712/ieee80211.c | 4 5 files changed, 20 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/5] staging: rtl8712: Fixed FSF address warning in basic_types.h
Signed-off-by: Parth Sane--- drivers/staging/rtl8712/basic_types.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/basic_types.h b/drivers/staging/rtl8712/basic_types.h index 7561bed..f5c0231 100644 --- a/drivers/staging/rtl8712/basic_types.h +++ b/drivers/staging/rtl8712/basic_types.h @@ -11,10 +11,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8712: Fixed Multiple Parenthesis Alignment
> On 20-Mar-2016, at 9:18 PM, Joe Percheswrote: > > On Sun, 2016-03-20 at 14:33 +, Parth Sane wrote: >> Fixed multiple parenthesis alignment warnings. >> Signed-off-by: Parth Sane > > Please always add a blank line after your changelog and > before your "Signed-off-by:" line > >> diff --git a/drivers/staging/rtl8712/hal_init.c >> b/drivers/staging/rtl8712/hal_init.c > [] >> @@ -197,7 +197,7 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter) >> 0x); >> memcpy(ppayload, ptr, dump_imem_sz); >> r8712_write_mem(padapter, RTL8712_DMA_VOQ, >> - dump_imem_sz + TXDESC_SIZE, >> +dump_imem_sz + TXDESC_SIZE, >>(u8 *)ptx_desc); > > Please align all lines of multi-line statements. > > checkpatch is a stupid little script. > You have to make sure your own patches are sensible. > > There are several things you should read and > understand in the Documentation directory. > > Documentation/CodingStyle > Documentation/SubmittingPatches > Documentation/SubmitChecklist > > Fixing checkpatch messages is sometimes a decent > way to understand this process, but the patches > that can be generated fixing these messages tend > to have low overall value. > > After doing a few of these, please move on to > some part of the kernel that interests you and > submit new code or start to fix actual defects. > > Maybe if you are interested in wireless drivers, > buy a NIC that isn't supported by the mac80211 > drivers and adapt the existing staging driver for > that variant. > > Code, test, validate, submit, repeat... > Hi, I’m first trying my hands at easy stuff before I actually move on to more difficult stuff. I will surely look in that direction. Thanks for your valuable inputs. Regards, Parth Sane signature.asc Description: Message signed with OpenPGP using GPGMail ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8712: Fixed Multiple Parenthesis Alignment
On Sun, 2016-03-20 at 14:33 +, Parth Sane wrote: > Fixed multiple parenthesis alignment warnings. > Signed-off-by: Parth SanePlease always add a blank line after your changelog and before your "Signed-off-by:" line > diff --git a/drivers/staging/rtl8712/hal_init.c > b/drivers/staging/rtl8712/hal_init.c [] > @@ -197,7 +197,7 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter) > 0x); > memcpy(ppayload, ptr, dump_imem_sz); > r8712_write_mem(padapter, RTL8712_DMA_VOQ, > - dump_imem_sz + TXDESC_SIZE, > + dump_imem_sz + TXDESC_SIZE, > (u8 *)ptx_desc); Please align all lines of multi-line statements. checkpatch is a stupid little script. You have to make sure your own patches are sensible. There are several things you should read and understand in the Documentation directory. Documentation/CodingStyle Documentation/SubmittingPatches Documentation/SubmitChecklist Fixing checkpatch messages is sometimes a decent way to understand this process, but the patches that can be generated fixing these messages tend to have low overall value. After doing a few of these, please move on to some part of the kernel that interests you and submit new code or start to fix actual defects. Maybe if you are interested in wireless drivers, buy a NIC that isn't supported by the mac80211 drivers and adapt the existing staging driver for that variant. Code, test, validate, submit, repeat... ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8712: Removed FSF address warning
> On 20-Mar-2016, at 7:56 PM, Larry Fingerwrote: > > On 03/20/2016 08:59 AM, Parth Sane wrote: >> Removed checkpatch warning caused by FSF address block >> Signed-off-by: Parth Sane >> --- >> drivers/staging/rtl8712/hal_init.c | 4 >> 1 file changed, 4 deletions(-) > > Now you have at least 3 different patches all with the same subject! How is > the maintainer supposed to keep them separate? Patchworks will replace each > of them with the next one having the same title. > > A better way would be to create a multiple-part set of patches with the > subject containing the name of the file being "fixed". > > Note that this warning was added to checkpatch.pl well after the driver was > added to the staging tree. In fact, if this warning had been present then, > the FSF address would have been removed. > > I consider this type of patch to be of minimal value; however, if you do not > remove this warning, then someone else will. Thus, you should repackage these > changes. By my count, there are 94 files containing this information. > Dropping them as one set of patches might be too many at once. I would split > them into groups of 13 files in one batch, 14 in the next, then 15, 16, 17, > and finally 19, then each group will also be distinguishable. > > If GregKH wants it done differently, he will let us know. > > Larry > Hi, It has been pointed out to me that I should send patch sets. I will be doing so. So please ignore the earlier sent patches except the parenthesis patch. Its been a pleasure to work with such a helpful community and hope to do do more in the future. Regards, Parth Sane signature.asc Description: Message signed with OpenPGP using GPGMail ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8712: Fixed Multiple Parenthesis Alignment
Fixed multiple parenthesis alignment warnings. Signed-off-by: Parth Sane--- drivers/staging/rtl8712/hal_init.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index 225ef37..afa7fe78 100644 --- a/drivers/staging/rtl8712/hal_init.c +++ b/drivers/staging/rtl8712/hal_init.c @@ -197,7 +197,7 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter) 0x); memcpy(ppayload, ptr, dump_imem_sz); r8712_write_mem(padapter, RTL8712_DMA_VOQ, - dump_imem_sz + TXDESC_SIZE, + dump_imem_sz + TXDESC_SIZE, (u8 *)ptx_desc); ptr += dump_imem_sz; imem_sz -= dump_imem_sz; @@ -226,7 +226,8 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter) 0x); memcpy(ppayload, ptr, dump_emem_sz); r8712_write_mem(padapter, RTL8712_DMA_VOQ, - dump_emem_sz + TXDESC_SIZE, (u8 *)ptx_desc); + dump_emem_sz + TXDESC_SIZE, + (u8 *)ptx_desc); ptr += dump_emem_sz; emem_sz -= dump_emem_sz; } while (emem_sz > 0); @@ -278,7 +279,7 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter) ptx_desc->txdw0 |= cpu_to_le32(BIT(28)); memcpy(ppayload, , fwhdr.fw_priv_sz); r8712_write_mem(padapter, RTL8712_DMA_VOQ, - fwhdr.fw_priv_sz + TXDESC_SIZE, (u8 *)ptx_desc); + fwhdr.fw_priv_sz + TXDESC_SIZE, (u8 *)ptx_desc); /* polling dmem code done */ i = 100; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8712: Removed FSF address warning
On 03/20/2016 08:59 AM, Parth Sane wrote: Removed checkpatch warning caused by FSF address block Signed-off-by: Parth Sane--- drivers/staging/rtl8712/hal_init.c | 4 1 file changed, 4 deletions(-) Now you have at least 3 different patches all with the same subject! How is the maintainer supposed to keep them separate? Patchworks will replace each of them with the next one having the same title. A better way would be to create a multiple-part set of patches with the subject containing the name of the file being "fixed". Note that this warning was added to checkpatch.pl well after the driver was added to the staging tree. In fact, if this warning had been present then, the FSF address would have been removed. I consider this type of patch to be of minimal value; however, if you do not remove this warning, then someone else will. Thus, you should repackage these changes. By my count, there are 94 files containing this information. Dropping them as one set of patches might be too many at once. I would split them into groups of 13 files in one batch, 14 in the next, then 15, 16, 17, and finally 19, then each group will also be distinguishable. If GregKH wants it done differently, he will let us know. Larry ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8712: Removed FSF address warning
Removed checkpatch warning caused due to FSF address paragraph Signed-off-by: Parth Sane--- drivers/staging/rtl8712/mlme_linux.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/mlme_linux.c b/drivers/staging/rtl8712/mlme_linux.c index e4e4bde..f124d72 100644 --- a/drivers/staging/rtl8712/mlme_linux.c +++ b/drivers/staging/rtl8712/mlme_linux.c @@ -13,10 +13,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8712: Removed FSF address warning
Removed checkpatch warning caused due to FSF address paragraph Signed-off-by: Parth Sane--- drivers/staging/rtl8712/ieee80211.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c index d13b4d5..8918654 100644 --- a/drivers/staging/rtl8712/ieee80211.c +++ b/drivers/staging/rtl8712/ieee80211.c @@ -13,10 +13,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8712: Removed FSF address warning
Removed checkpatch warning caused by FSF address block Signed-off-by: Parth Sane--- drivers/staging/rtl8712/hal_init.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index 8008efe..225ef37 100644 --- a/drivers/staging/rtl8712/hal_init.c +++ b/drivers/staging/rtl8712/hal_init.c @@ -13,10 +13,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8712: Removed FSF address warning
Removed checkpatch warning caused by FSF address paragraph. Signed-off-by: Parth Sane--- drivers/staging/rtl8712/ethernet.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/ethernet.h b/drivers/staging/rtl8712/ethernet.h index fad173f..039da36 100644 --- a/drivers/staging/rtl8712/ethernet.h +++ b/drivers/staging/rtl8712/ethernet.h @@ -11,10 +11,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: comedi: dt282x: tidy up register bit defines
Arnd Bergmann pointed out that gcc-6 warns about passing negative signed integer into swab16() due to the macro expansion of 'outw'. It appears that the register map constants are causing the warnings. Actually, it might just be the (1 << 15) ones... Convert all the constants as suggested by checkpatch.pl: CHECK: Prefer using the BIT macro The BIT() macro will make all the constants explicitly 'unsigned', which helps to avoid the warning. Fix the, unsused, DT2821_CHANCSR_PRESLA() macro. The "Present List Address" (PRESLA) bits in the CHANCSR register are read only. This define was meant to extract the bits from the read value. Signed-off-by: H Hartley SweetenReported-by: Arnd Bergmann Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt282x.c | 65 + 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c index 40bf009..06a87a1 100644 --- a/drivers/staging/comedi/drivers/dt282x.c +++ b/drivers/staging/comedi/drivers/dt282x.c @@ -69,48 +69,49 @@ * Register map */ #define DT2821_ADCSR_REG 0x00 -#define DT2821_ADCSR_ADERR (1 << 15) -#define DT2821_ADCSR_ADCLK (1 << 9) -#define DT2821_ADCSR_MUXBUSY (1 << 8) -#define DT2821_ADCSR_ADDONE(1 << 7) -#define DT2821_ADCSR_IADDONE (1 << 6) +#define DT2821_ADCSR_ADERR BIT(15) +#define DT2821_ADCSR_ADCLK BIT(9) +#define DT2821_ADCSR_MUXBUSY BIT(8) +#define DT2821_ADCSR_ADDONEBIT(7) +#define DT2821_ADCSR_IADDONE BIT(6) #define DT2821_ADCSR_GS(x) (((x) & 0x3) << 4) #define DT2821_ADCSR_CHAN(x) (((x) & 0xf) << 0) #define DT2821_CHANCSR_REG 0x02 -#define DT2821_CHANCSR_LLE (1 << 15) -#define DT2821_CHANCSR_PRESLA(x) (((x) & 0xf) >> 8) +#define DT2821_CHANCSR_LLE BIT(15) +#define DT2821_CHANCSR_TO_PRESLA(x)(((x) >> 8) & 0xf) #define DT2821_CHANCSR_NUMB(x) x) - 1) & 0xf) << 0) #define DT2821_ADDAT_REG 0x04 #define DT2821_DACSR_REG 0x06 -#define DT2821_DACSR_DAERR (1 << 15) +#define DT2821_DACSR_DAERR BIT(15) #define DT2821_DACSR_YSEL(x) ((x) << 9) -#define DT2821_DACSR_SSEL (1 << 8) -#define DT2821_DACSR_DACRDY(1 << 7) -#define DT2821_DACSR_IDARDY(1 << 6) -#define DT2821_DACSR_DACLK (1 << 5) -#define DT2821_DACSR_HBOE (1 << 1) -#define DT2821_DACSR_LBOE (1 << 0) +#define DT2821_DACSR_SSEL BIT(8) +#define DT2821_DACSR_DACRDYBIT(7) +#define DT2821_DACSR_IDARDYBIT(6) +#define DT2821_DACSR_DACLK BIT(5) +#define DT2821_DACSR_HBOE BIT(1) +#define DT2821_DACSR_LBOE BIT(0) #define DT2821_DADAT_REG 0x08 #define DT2821_DIODAT_REG 0x0a #define DT2821_SUPCSR_REG 0x0c -#define DT2821_SUPCSR_DMAD (1 << 15) -#define DT2821_SUPCSR_ERRINTEN (1 << 14) -#define DT2821_SUPCSR_CLRDMADNE(1 << 13) -#define DT2821_SUPCSR_DDMA (1 << 12) -#define DT2821_SUPCSR_DS_PIO (0 << 10) -#define DT2821_SUPCSR_DS_AD_CLK(1 << 10) -#define DT2821_SUPCSR_DS_DA_CLK(2 << 10) -#define DT2821_SUPCSR_DS_AD_TRIG (3 << 10) -#define DT2821_SUPCSR_BUFFB(1 << 9) -#define DT2821_SUPCSR_SCDN (1 << 8) -#define DT2821_SUPCSR_DACON(1 << 7) -#define DT2821_SUPCSR_ADCINIT (1 << 6) -#define DT2821_SUPCSR_DACINIT (1 << 5) -#define DT2821_SUPCSR_PRLD (1 << 4) -#define DT2821_SUPCSR_STRIG(1 << 3) -#define DT2821_SUPCSR_XTRIG(1 << 2) -#define DT2821_SUPCSR_XCLK (1 << 1) -#define DT2821_SUPCSR_BDINIT (1 << 0) +#define DT2821_SUPCSR_DMAD BIT(15) +#define DT2821_SUPCSR_ERRINTEN BIT(14) +#define DT2821_SUPCSR_CLRDMADNEBIT(13) +#define DT2821_SUPCSR_DDMA BIT(12) +#define DT2821_SUPCSR_DS(x)(((x) & 0x3) << 10) +#define DT2821_SUPCSR_DS_PIO DT2821_SUPCSR_DS(0) +#define DT2821_SUPCSR_DS_AD_CLKDT2821_SUPCSR_DS(1) +#define DT2821_SUPCSR_DS_DA_CLKDT2821_SUPCSR_DS(2) +#define DT2821_SUPCSR_DS_AD_TRIG DT2821_SUPCSR_DS(3) +#define DT2821_SUPCSR_BUFFBBIT(9) +#define DT2821_SUPCSR_SCDN BIT(8) +#define DT2821_SUPCSR_DACONBIT(7) +#define DT2821_SUPCSR_ADCINIT BIT(6) +#define DT2821_SUPCSR_DACINIT BIT(5) +#define DT2821_SUPCSR_PRLD BIT(4) +#define DT2821_SUPCSR_STRIGBIT(3) +#define DT2821_SUPCSR_XTRIGBIT(2) +#define DT2821_SUPCSR_XCLK
[PATCH v2] staging: rtl8712: Removed warning about FSFs mailing address
Removed FSF address notice which causes checkpatch warning. Signed-off-by: Parth Sane--- drivers/staging/rtl8712/drv_types.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/drv_types.h b/drivers/staging/rtl8712/drv_types.h index 29e47e1..ae79047 100644 --- a/drivers/staging/rtl8712/drv_types.h +++ b/drivers/staging/rtl8712/drv_types.h @@ -11,10 +11,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * * Modifications for inclusion into the Linux staging tree are * Copyright(c) 2010 Larry Finger. All rights reserved. * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/42] staging: comedi: ni_660x: Prefer kernel type 'u64' over 'uint64_t'
Fix the checkpatch.pl issues. Signed-off-by: H Hartley SweetenCc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 6ca5c67..4f7f5ca 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -331,7 +331,7 @@ static const struct ni_660x_board ni_660x_boards[] = { struct ni_660x_private { struct mite_struct *mite; struct ni_gpct_device *counter_dev; - uint64_t pfi_direction_bits; + u64 pfi_direction_bits; struct mite_dma_descriptor_ring *mite_rings[NI_660X_MAX_NUM_CHIPS][counters_per_chip]; spinlock_t mite_channel_lock; @@ -854,7 +854,7 @@ static int ni_660x_set_pfi_routing(struct comedi_device *dev, } devpriv->pfi_output_selects[chan] = source; - if (devpriv->pfi_direction_bits & (((uint64_t) 1) << chan)) + if (devpriv->pfi_direction_bits & (1ULL << chan)) ni_660x_select_pfi_output(dev, chan, devpriv->pfi_output_selects[chan]); return 0; @@ -867,7 +867,7 @@ static int ni_660x_dio_insn_config(struct comedi_device *dev, { struct ni_660x_private *devpriv = dev->private; unsigned int chan = CR_CHAN(insn->chanspec); - uint64_t bit = 1ULL << chan; + u64 bit = 1ULL << chan; unsigned int val; int ret; -- 2.6.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/42] staging: comedi: ni_660x: remove ni_660x_num_counters()
This inline function is only used by the (*auto_attach). Remove it and just use a local variable for the calculation. Signed-off-by: H Hartley SweetenCc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 595c862..6a3a12e 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -342,13 +342,6 @@ struct ni_660x_private { unsigned short pfi_output_selects[NUM_PFI_CHANNELS]; }; -static inline unsigned ni_660x_num_counters(struct comedi_device *dev) -{ - const struct ni_660x_board *board = dev->board_ptr; - - return board->n_chips * counters_per_chip; -} - static enum ni_660x_register ni_gpct_to_660x_register(enum ni_gpct_register reg) { switch (reg) { @@ -927,6 +920,7 @@ static int ni_660x_auto_attach(struct comedi_device *dev, const struct ni_660x_board *board = NULL; struct ni_660x_private *devpriv; struct comedi_subdevice *s; + unsigned int n_counters; int subdev; int ret; unsigned i; @@ -986,17 +980,17 @@ static int ni_660x_auto_attach(struct comedi_device *dev, */ ni_660x_write(dev, 0, 0, NI660X_STC_DIO_CONTROL); + n_counters = board->n_chips * counters_per_chip; devpriv->counter_dev = ni_gpct_device_construct(dev, ni_660x_gpct_write, ni_660x_gpct_read, ni_gpct_variant_660x, -ni_660x_num_counters -(dev)); +n_counters); if (!devpriv->counter_dev) return -ENOMEM; for (i = 0; i < NI_660X_MAX_NUM_COUNTERS; ++i) { s = >subdevices[subdev++]; - if (i < ni_660x_num_counters(dev)) { + if (i < n_counters) { s->type = COMEDI_SUBD_COUNTER; s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_LSAMPL | SDF_CMD_READ; @@ -1025,7 +1019,7 @@ static int ni_660x_auto_attach(struct comedi_device *dev, for (i = 0; i < board->n_chips; ++i) init_tio_chip(dev, i); - for (i = 0; i < ni_660x_num_counters(dev); ++i) + for (i = 0; i < n_counters; ++i) ni_tio_init_counter(>counter_dev->counters[i]); for (i = 0; i < NUM_PFI_CHANNELS; ++i) { -- 2.6.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] staging: comedi: ni_mio_common: fix the ni_write[blw]() functions
On Wednesday, March 16, 2016 3:22 AM, Ian Abbott wrote: > On 15/03/16 21:48, H Hartley Sweeten wrote: >> Memory mapped io (dev->mmio) should not also be writing to the ioport >> (dev->iobase) registers. Add the missing 'else' to these functions. >> >> Signed-off-by: H Hartley Sweeten>> Cc: Ian Abbott >> Cc: Greg Kroah-Hartman >> --- >> drivers/staging/comedi/drivers/ni_mio_common.c | 12 ++-- >> 1 file changed, 6 insertions(+), 6 deletions(-) > > Please add: > > Fixes: 0953ee4acca0 ("staging: comedi: ni_mio_common: checkpatch.pl > cleanup (else not useful)") > Cc: # 3.17+ > > Reviewed-by: Ian Abbott Ugh... Looks like I broke it. Greg, Would you like me to repost this with the Fixes/Cc added or do you got it? Thanks, Hartley ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers: hv: vmbus: handle various crash scenarios
Radim Krcmarwrites: > 2016-03-18 13:33+0100, Vitaly Kuznetsov: >> Kdump keeps biting. Turns out CHANNELMSG_UNLOAD_RESPONSE is always >> delivered to CPU0 regardless of what CPU we're sending CHANNELMSG_UNLOAD >> from. vmbus_wait_for_unload() doesn't account for the fact that in case >> we're crashing on some other CPU and CPU0 is still alive and operational >> CHANNELMSG_UNLOAD_RESPONSE will be delivered there completing >> vmbus_connection.unload_event, our wait on the current CPU will never >> end. > > (Any chance of learning about this behavior from the spec?) > >> Do the following: >> 1) Check for completion_done() in the loop. In case interrupt handler is >>still alive we'll get the confirmation we need. >> >> 2) Always read CPU0's message page as CHANNELMSG_UNLOAD_RESPONSE will be >>delivered there. We can race with still-alive interrupt handler doing >>the same but we don't care as we're checking completion_done() now. > > (Yeah, seems better than hv_setup_vmbus_irq(NULL) or other hacks.) > >> 3) Cleanup message pages on all CPUs. This is required (at least for the >>current CPU as we're clearing CPU0 messages now but we may want to bring >>up additional CPUs on crash) as new messages won't be delivered till we >>consume what's pending. On boot we'll place message pages somewhere else >>and we won't be able to read stale messages. > > What if HV already set the pending message bit on current message, > do we get any guarantees that clearing once after UNLOAD_RESPONSE is > enough? I think so but I'd like to get a confirmation from K.Y./Alex/Haiyang. > >> Signed-off-by: Vitaly Kuznetsov >> --- > > I had a question about NULL below. (Parenthesised rants aren't related > to r-b tag. ;) > >> drivers/hv/channel_mgmt.c | 30 +- >> 1 file changed, 25 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c >> index b10e8f74..5f37057 100644 >> --- a/drivers/hv/channel_mgmt.c >> +++ b/drivers/hv/channel_mgmt.c >> @@ -512,14 +512,26 @@ static void init_vp_index(struct vmbus_channel >> *channel, const uuid_le *type_gui >> >> static void vmbus_wait_for_unload(void) >> { >> -int cpu = smp_processor_id(); >> -void *page_addr = hv_context.synic_message_page[cpu]; >> +int cpu; >> +void *page_addr = hv_context.synic_message_page[0]; >> struct hv_message *msg = (struct hv_message *)page_addr + >>VMBUS_MESSAGE_SINT; >> struct vmbus_channel_message_header *hdr; >> bool unloaded = false; >> >> -while (1) { >> +/* >> + * CHANNELMSG_UNLOAD_RESPONSE is always delivered to CPU0. When we're >> + * crashing on a different CPU let's hope that IRQ handler on CPU0 is >> + * still functional and vmbus_unload_response() will complete >> + * vmbus_connection.unload_event. If not, the last thing we can do is >> + * read message page for CPU0 regardless of what CPU we're on. >> + */ >> +while (!unloaded) { > > (I'd feel a bit safer if this was bounded by some timeout, but all > scenarios where this would make a difference are unplausible ... > queue_work() not working while the rest is fine is the best one.) > >> +if (completion_done(_connection.unload_event)) { >> +unloaded = true; > > (No need to set unloaded when you break.) > >> +break; >> +} >> + >> if (READ_ONCE(msg->header.message_type) == HVMSG_NONE) { >> mdelay(10); >> continue; >> @@ -530,9 +542,17 @@ static void vmbus_wait_for_unload(void) > > (I'm not a huge fan of the unloaded variable; what about remembering the > header/msgtype here ... > >> unloaded = true; >> >> vmbus_signal_eom(msg); > > and checking its value here?) > Sure, but we'll have to use a variable for that ... why would it be better than 'unloaded'? >> +} >> >> -if (unloaded) >> -break; >> +/* >> + * We're crashing and already got the UNLOAD_RESPONSE, cleanup all >> + * maybe-pending messages on all CPUs to be able to receive new >> + * messages after we reconnect. >> + */ >> +for_each_online_cpu(cpu) { >> +page_addr = hv_context.synic_message_page[cpu]; > > Can't this be NULL? It can't, we allocate it from hv_synic_alloc() (and we don't support cpu onlining/offlining on WS2012R2+). > >> +msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT; >> +msg->header.message_type = HVMSG_NONE; >> } > > (And, this block belongs to a separate function. ;]) I thought about moving it to hv_crash_handler() but then I decided to leave it here as the need for this fixup is rather an artifact of how we recieve the message. But I'm flexible here) -- Vitaly
Re: [PATCH v3] staging: netlogic: Fixed alignment of parentheseis checkpatch warning
On Sun, 2016-03-20 at 02:03 +, Parth Sane wrote: > Fixed alignment of parenthesis checkpatch warning to fit coding > standards. This isn't the same code block as your previous patch. Previously you were modifying the block starting at line 120, this is starting at 168 and it doesn't actually need modification. Also, you are not making this patch against either Greg KH's staging-next or Stephen Rothwell's -next This change has already been done by: commit 3a694d0c294a081cc13a16c7e43d8cb473edf350 Author: Laura Garcia LiebanaDate: Wed Feb 17 09:46:35 2016 +0100 staging: netlogic: Fix several parentheses alignments Align arguments with the open parenthesis. Checkpatch found these issues. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/9] rtlwifi: btcoexist: Fix Smatch warning
Smatch reports the following: CHECK drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3078 btc8723b2ant_run_coexist_mechanism() warn: inconsistent indenting Signed-off-by: Larry Finger--- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c index 77cbd10..205f78b 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c @@ -3075,7 +3075,7 @@ static void btc8723b2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) "[BTCoex], Action 2-Ant, " "algorithm = HS mode.\n"); btc8723b2ant_action_pan_hs(btcoexist); - break; + break; case BT_8723B_2ANT_COEX_ALGO_PANEDR_A2DP: BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE, "[BTCoex], Action 2-Ant, " -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] dma-buf/sync_file: de-stage sync_file
From: Gustavo Padovansync_file is useful to connect one or more fences to the file. The file is used by userspace to track fences. Signed-off-by: Gustavo Padovan --- drivers/Kconfig| 2 + drivers/dma-buf/Kconfig| 11 + drivers/dma-buf/Makefile | 1 + drivers/dma-buf/sync_file.c| 382 + drivers/staging/android/Kconfig| 1 + drivers/staging/android/sync.c | 362 --- drivers/staging/android/sync.h | 92 + drivers/staging/android/sync_debug.c | 1 + include/linux/sync_file.h | 106 ++ .../uapi/sync.h => include/uapi/linux/sync_file.h | 0 10 files changed, 506 insertions(+), 452 deletions(-) create mode 100644 drivers/dma-buf/Kconfig create mode 100644 drivers/dma-buf/sync_file.c create mode 100644 include/linux/sync_file.h rename drivers/staging/android/uapi/sync.h => include/uapi/linux/sync_file.h (100%) diff --git a/drivers/Kconfig b/drivers/Kconfig index d2ac339..430f761 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -114,6 +114,8 @@ source "drivers/rtc/Kconfig" source "drivers/dma/Kconfig" +source "drivers/dma-buf/Kconfig" + source "drivers/dca/Kconfig" source "drivers/auxdisplay/Kconfig" diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig new file mode 100644 index 000..9824bc4 --- /dev/null +++ b/drivers/dma-buf/Kconfig @@ -0,0 +1,11 @@ +menu "DMABUF options" + +config SYNC_FILE + bool "sync_file support for fences" + default n + select ANON_INODES + select DMA_SHARED_BUFFER + ---help--- + This option enables the fence framework synchronization to export + sync_files to userspace that can represent one or more fences. +endmenu diff --git a/drivers/dma-buf/Makefile b/drivers/dma-buf/Makefile index 57a675f..4a424ec 100644 --- a/drivers/dma-buf/Makefile +++ b/drivers/dma-buf/Makefile @@ -1 +1,2 @@ obj-y := dma-buf.o fence.o reservation.o seqno-fence.o +obj-$(CONFIG_SYNC_FILE)+= sync_file.o diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c new file mode 100644 index 000..df786a2 --- /dev/null +++ b/drivers/dma-buf/sync_file.c @@ -0,0 +1,382 @@ +/* + * drivers/dma-buf/sync_file.c + * + * Copyright (C) 2012 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const struct file_operations sync_file_fops; + +static struct sync_file *sync_file_alloc(int size, const char *name) +{ + struct sync_file *sync_file; + + sync_file = kzalloc(size, GFP_KERNEL); + if (!sync_file) + return NULL; + + sync_file->file = anon_inode_getfile("sync_file", _file_fops, +sync_file, 0); + if (IS_ERR(sync_file->file)) + goto err; + + kref_init(_file->kref); + strlcpy(sync_file->name, name, sizeof(sync_file->name)); + + init_waitqueue_head(_file->wq); + + return sync_file; + +err: + kfree(sync_file); + return NULL; +} + +static void fence_check_cb_func(struct fence *f, struct fence_cb *cb) +{ + struct sync_file_cb *check; + struct sync_file *sync_file; + + check = container_of(cb, struct sync_file_cb, cb); + sync_file = check->sync_file; + + if (atomic_dec_and_test(_file->status)) + wake_up_all(_file->wq); +} + +/* TODO: implement a create which takes more that one fence */ +struct sync_file *sync_file_create(const char *name, struct fence *fence) +{ + struct sync_file *sync_file; + + sync_file = sync_file_alloc(offsetof(struct sync_file, cbs[1]), + name); + if (!sync_file) + return NULL; + + sync_file->num_fences = 1; + atomic_set(_file->status, 1); + + sync_file->cbs[0].fence = fence; + sync_file->cbs[0].sync_file = sync_file; + if (fence_add_callback(fence, _file->cbs[0].cb, + fence_check_cb_func)) + atomic_dec(_file->status); + + return sync_file; +} +EXPORT_SYMBOL(sync_file_create); + +struct sync_file *sync_file_fdget(int fd) +{ + struct file *file = fget(fd); + + if (!file) +