Re: [PATCH] Staging: comedi: Fix 'unsigned' warning style
On 27/03/16 18:52, Aniket Sharma wrote: This patch fixes the checkpatch.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' + unsigned runflags; WARNING: Prefer 'unsigned int' to bare use of 'unsigned' +struct comedi_device *comedi_dev_get_from_minor(unsigned minor); Signed-off-by: Aniket Sharma --- drivers/staging/comedi/comedidev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index 1158072..dcb6376 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -173,7 +173,7 @@ struct comedi_subdevice { void *lock; void *busy; - unsigned runflags; + unsigned int runflags; spinlock_t spin_lock; /* generic spin-lock for COMEDI and drivers */ unsigned int io_bits; @@ -566,7 +566,7 @@ struct comedi_device { void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s); -struct comedi_device *comedi_dev_get_from_minor(unsigned minor); +struct comedi_device *comedi_dev_get_from_minor(unsigned int minor); int comedi_dev_put(struct comedi_device *dev); bool comedi_is_subdevice_running(struct comedi_subdevice *s); Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] dma-buf: Update docs for SYNC ioctl
Hi On Mon, Mar 28, 2016 at 9:42 PM, Tiago Vignatti wrote: > Do we have an agreement here after all? David? I need to know whether this > fixup is okay to go cause I'll need to submit to Chrome OS then. Sure it is fine. The code is already there, we cannot change it. Thanks David ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: comedi: comedi_fops.c: fix lines over 80 characters
Fix checkpatch.pl warnings about lines over 80 characters in "comedi_fops.c". Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi_fops.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 4bdea20..629080f 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -209,8 +209,8 @@ static void comedi_free_board_dev(struct comedi_device *dev) } } -static struct comedi_subdevice -*comedi_subdevice_from_minor(const struct comedi_device *dev, unsigned int minor) +static struct comedi_subdevice * +comedi_subdevice_from_minor(const struct comedi_device *dev, unsigned int minor) { struct comedi_subdevice *s; unsigned int i = minor - COMEDI_NUM_BOARD_MINORS; @@ -233,7 +233,8 @@ static struct comedi_device *comedi_dev_get_from_board_minor(unsigned int minor) return dev; } -static struct comedi_device *comedi_dev_get_from_subdevice_minor(unsigned int minor) +static struct comedi_device * +comedi_dev_get_from_subdevice_minor(unsigned int minor) { struct comedi_device *dev; struct comedi_subdevice *s; @@ -342,7 +343,8 @@ static struct comedi_subdevice *comedi_file_write_subdevice(struct file *file) } static int resize_async_buffer(struct comedi_device *dev, - struct comedi_subdevice *s, unsigned int new_size) + struct comedi_subdevice *s, + unsigned int new_size) { struct comedi_async *async = s->async; int retval; @@ -628,7 +630,8 @@ static void __comedi_set_subdevice_runflags(struct comedi_subdevice *s, } static void comedi_update_subdevice_runflags(struct comedi_subdevice *s, -unsigned int mask, unsigned int bits) +unsigned int mask, +unsigned int bits) { unsigned long flags; @@ -2485,7 +2488,8 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes, n = min_t(size_t, m, nbytes); if (n == 0) { - unsigned int runflags = comedi_get_subdevice_runflags(s); + unsigned int runflags = +comedi_get_subdevice_runflags(s); if (!comedi_is_runflags_running(runflags)) { if (comedi_is_runflags_in_error(runflags)) -- 2.7.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] Drivers: hv: kvp: fix IP Failover
"K. Y. Srinivasan" writes: > From: Vitaly Kuznetsov > > Hyper-V VMs can be replicated to another hosts and there is a feature to > set different IP for replicas, it is called 'Failover TCP/IP'. When > such guest starts Hyper-V host sends it KVP_OP_SET_IP_INFO message as soon > as we finish negotiation procedure. The problem is that it can happen (and > it actually happens) before userspace daemon connects and we reply with > HV_E_FAIL to the message. As there are no repetitions we fail to set the > requested IP. > > Solve the issue by postponing our reply to the negotiation message till > userspace daemon is connected. We can't wait too long as there is a > host-side timeout (cca. 75 seconds) and if we fail to reply in this time > frame the whole KVP service will become inactive. The solution is not > ideal - if it takes userspace daemon more than 60 seconds to connect > IP Failover will still fail but I don't see a solution with our current > separation between kernel and userspace parts. > > Other two modules (VSS and FCOPY) don't require such delay, leave them > untouched. > > Signed-off-by: Vitaly Kuznetsov > Signed-off-by: K. Y. Srinivasan An issue was found with this patch: we don't cancel kvp_host_handshake_work on module unload and if the work is still pending we end up crashing. As far as I can see this series didn't make it to char-misc tree so instead of sending a patch to this patch I'll send v2 for the original issue. Sorry for the inconvenience. > --- > drivers/hv/hv_kvp.c | 30 ++ > drivers/hv/hyperv_vmbus.h |5 + > 2 files changed, 35 insertions(+), 0 deletions(-) > > diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c > index 9b9b370..0d3fcd6 100644 > --- a/drivers/hv/hv_kvp.c > +++ b/drivers/hv/hv_kvp.c > @@ -78,9 +78,11 @@ static void kvp_send_key(struct work_struct *dummy); > > static void kvp_respond_to_host(struct hv_kvp_msg *msg, int error); > static void kvp_timeout_func(struct work_struct *dummy); > +static void kvp_host_handshake_func(struct work_struct *dummy); > static void kvp_register(int); > > static DECLARE_DELAYED_WORK(kvp_timeout_work, kvp_timeout_func); > +static DECLARE_DELAYED_WORK(kvp_host_handshake_work, > kvp_host_handshake_func); > static DECLARE_WORK(kvp_sendkey_work, kvp_send_key); > > static const char kvp_devname[] = "vmbus/hv_kvp"; > @@ -130,6 +132,11 @@ static void kvp_timeout_func(struct work_struct *dummy) > hv_poll_channel(kvp_transaction.recv_channel, kvp_poll_wrapper); > } > > +static void kvp_host_handshake_func(struct work_struct *dummy) > +{ > + hv_poll_channel(kvp_transaction.recv_channel, hv_kvp_onchannelcallback); > +} > + > static int kvp_handle_handshake(struct hv_kvp_msg *msg) > { > switch (msg->kvp_hdr.operation) { > @@ -154,6 +161,12 @@ static int kvp_handle_handshake(struct hv_kvp_msg *msg) > pr_debug("KVP: userspace daemon ver. %d registered\n", >KVP_OP_REGISTER); > kvp_register(dm_reg_value); > + > + /* > + * If we're still negotiating with the host cancel the timeout > + * work to not poll the channel twice. > + */ > + cancel_delayed_work_sync(&kvp_host_handshake_work); > hv_poll_channel(kvp_transaction.recv_channel, kvp_poll_wrapper); > > return 0; > @@ -594,7 +607,22 @@ void hv_kvp_onchannelcallback(void *context) > struct icmsg_negotiate *negop = NULL; > int util_fw_version; > int kvp_srv_version; > + static enum {NEGO_NOT_STARTED, > + NEGO_IN_PROGRESS, > + NEGO_FINISHED} host_negotiatied = NEGO_NOT_STARTED; > > + if (host_negotiatied == NEGO_NOT_STARTED && > + kvp_transaction.state < HVUTIL_READY) { > + /* > + * If userspace daemon is not connected and host is asking > + * us to negotiate we need to delay to not lose messages. > + * This is important for Failover IP setting. > + */ > + host_negotiatied = NEGO_IN_PROGRESS; > + schedule_delayed_work(&kvp_host_handshake_work, > + HV_UTIL_NEGO_TIMEOUT * HZ); > + return; > + } > if (kvp_transaction.state > HVUTIL_READY) > return; > > @@ -672,6 +700,8 @@ void hv_kvp_onchannelcallback(void *context) > vmbus_sendpacket(channel, recv_buffer, > recvlen, requestid, > VM_PKT_DATA_INBAND, 0); > + > + host_negotiatied = NEGO_FINISHED; > } > > } > diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h > index a64b176..28e9df9 100644 > --- a/drivers/hv/hyperv_vmbus.h > +++ b/drivers/hv/hyperv_vmbus.h > @@ -36,6 +36,11 @@ > #define HV_UTIL_TIMEOUT 30 > > /* > + * Timeout for guest-host handshake for services. > + */ > +#define HV_UTIL_NEGO_TIMEOUT 60 > + > +/* > * The below CPUID leaves are present if VersionAndFeature
[PATCH v2] Drivers: hv: kvp: fix IP Failover
Hyper-V VMs can be replicated to another hosts and there is a feature to set different IP for replicas, it is called 'Failover TCP/IP'. When such guest starts Hyper-V host sends it KVP_OP_SET_IP_INFO message as soon as we finish negotiation procedure. The problem is that it can happen (and it actually happens) before userspace daemon connects and we reply with HV_E_FAIL to the message. As there are no repetitions we fail to set the requested IP. Solve the issue by postponing our reply to the negotiation message till userspace daemon is connected. We can't wait too long as there is a host-side timeout (cca. 75 seconds) and if we fail to reply in this time frame the whole KVP service will become inactive. The solution is not ideal - if it takes userspace daemon more than 60 seconds to connect IP Failover will still fail but I don't see a solution with our current separation between kernel and userspace parts. Other two modules (VSS and FCOPY) don't require such delay, leave them untouched. Signed-off-by: Vitaly Kuznetsov --- Changes since v1: - Cancel handshake timeout work on module unload. --- drivers/hv/hv_kvp.c | 31 +++ drivers/hv/hyperv_vmbus.h | 5 + 2 files changed, 36 insertions(+) diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c index 9b9b370..cb1a916 100644 --- a/drivers/hv/hv_kvp.c +++ b/drivers/hv/hv_kvp.c @@ -78,9 +78,11 @@ static void kvp_send_key(struct work_struct *dummy); static void kvp_respond_to_host(struct hv_kvp_msg *msg, int error); static void kvp_timeout_func(struct work_struct *dummy); +static void kvp_host_handshake_func(struct work_struct *dummy); static void kvp_register(int); static DECLARE_DELAYED_WORK(kvp_timeout_work, kvp_timeout_func); +static DECLARE_DELAYED_WORK(kvp_host_handshake_work, kvp_host_handshake_func); static DECLARE_WORK(kvp_sendkey_work, kvp_send_key); static const char kvp_devname[] = "vmbus/hv_kvp"; @@ -130,6 +132,11 @@ static void kvp_timeout_func(struct work_struct *dummy) hv_poll_channel(kvp_transaction.recv_channel, kvp_poll_wrapper); } +static void kvp_host_handshake_func(struct work_struct *dummy) +{ + hv_poll_channel(kvp_transaction.recv_channel, hv_kvp_onchannelcallback); +} + static int kvp_handle_handshake(struct hv_kvp_msg *msg) { switch (msg->kvp_hdr.operation) { @@ -154,6 +161,12 @@ static int kvp_handle_handshake(struct hv_kvp_msg *msg) pr_debug("KVP: userspace daemon ver. %d registered\n", KVP_OP_REGISTER); kvp_register(dm_reg_value); + + /* +* If we're still negotiating with the host cancel the timeout +* work to not poll the channel twice. +*/ + cancel_delayed_work_sync(&kvp_host_handshake_work); hv_poll_channel(kvp_transaction.recv_channel, kvp_poll_wrapper); return 0; @@ -594,7 +607,22 @@ void hv_kvp_onchannelcallback(void *context) struct icmsg_negotiate *negop = NULL; int util_fw_version; int kvp_srv_version; + static enum {NEGO_NOT_STARTED, +NEGO_IN_PROGRESS, +NEGO_FINISHED} host_negotiatied = NEGO_NOT_STARTED; + if (host_negotiatied == NEGO_NOT_STARTED && + kvp_transaction.state < HVUTIL_READY) { + /* +* If userspace daemon is not connected and host is asking +* us to negotiate we need to delay to not lose messages. +* This is important for Failover IP setting. +*/ + host_negotiatied = NEGO_IN_PROGRESS; + schedule_delayed_work(&kvp_host_handshake_work, + HV_UTIL_NEGO_TIMEOUT * HZ); + return; + } if (kvp_transaction.state > HVUTIL_READY) return; @@ -672,6 +700,8 @@ void hv_kvp_onchannelcallback(void *context) vmbus_sendpacket(channel, recv_buffer, recvlen, requestid, VM_PKT_DATA_INBAND, 0); + + host_negotiatied = NEGO_FINISHED; } } @@ -708,6 +738,7 @@ hv_kvp_init(struct hv_util_service *srv) void hv_kvp_deinit(void) { kvp_transaction.state = HVUTIL_DEVICE_DYING; + cancel_delayed_work_sync(&kvp_host_handshake_work); cancel_delayed_work_sync(&kvp_timeout_work); cancel_work_sync(&kvp_sendkey_work); hvutil_transport_destroy(hvt); diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 12321b9..8b07f9c 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -36,6 +36,11 @@ #define HV_UTIL_TIMEOUT 30 /* + * Timeout for guest-host handshake for services. + */ +#define HV_UTIL_NEGO_TIMEOUT 60 + +/* * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent * is set by CPUID(HVCPUID_VERSION_FEATURES). */ -- 2.5.5 ___ devel mailing list de
Re: [PATCH] Staging: rtl8723au: Remove function rtw_enqueue_{recvbuf23a/recvbuf23a_to_head}
Bhumika Goyal writes: > The functions rtw_enqueue_recvbuf23a and rtw_enqueue_recvbuf23a_to_head > are never used anywhere in the kernel. So, remove their definition and > prototype. > Grepped to find occurences. > > Signed-off-by: Bhumika Goyal > --- > drivers/staging/rtl8723au/core/rtw_recv.c| 25 - > drivers/staging/rtl8723au/include/rtw_recv.h | 2 -- > 2 files changed, 27 deletions(-) Looks reasonable to me. Acked-by: Jes Sorensen Jes > diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c > b/drivers/staging/rtl8723au/core/rtw_recv.c > index 989ed07..150dabc 100644 > --- a/drivers/staging/rtl8723au/core/rtw_recv.c > +++ b/drivers/staging/rtl8723au/core/rtw_recv.c > @@ -211,31 +211,6 @@ u32 rtw_free_uc_swdec_pending_queue23a(struct > rtw_adapter *adapter) > return cnt; > } > > -int rtw_enqueue_recvbuf23a_to_head(struct recv_buf *precvbuf, struct > rtw_queue *queue) > -{ > - spin_lock_bh(&queue->lock); > - > - list_del_init(&precvbuf->list); > - list_add(&precvbuf->list, get_list_head(queue)); > - > - spin_unlock_bh(&queue->lock); > - > - return _SUCCESS; > -} > - > -int rtw_enqueue_recvbuf23a(struct recv_buf *precvbuf, struct rtw_queue > *queue) > -{ > - unsigned long irqL; > - > - spin_lock_irqsave(&queue->lock, irqL); > - > - list_del_init(&precvbuf->list); > - > - list_add_tail(&precvbuf->list, get_list_head(queue)); > - spin_unlock_irqrestore(&queue->lock, irqL); > - return _SUCCESS; > -} > - > struct recv_buf *rtw_dequeue_recvbuf23a (struct rtw_queue *queue) > { > unsigned long irqL; > diff --git a/drivers/staging/rtl8723au/include/rtw_recv.h > b/drivers/staging/rtl8723au/include/rtw_recv.h > index dc784be..85a5edb 100644 > --- a/drivers/staging/rtl8723au/include/rtw_recv.h > +++ b/drivers/staging/rtl8723au/include/rtw_recv.h > @@ -279,8 +279,6 @@ int rtw_enqueue_recvframe23a(struct recv_frame > *precvframe, struct rtw_queue *qu > > u32 rtw_free_uc_swdec_pending_queue23a(struct rtw_adapter *adapter); > > -int rtw_enqueue_recvbuf23a_to_head(struct recv_buf *precvbuf, struct > rtw_queue *queue); > -int rtw_enqueue_recvbuf23a(struct recv_buf *precvbuf, struct rtw_queue > *queue); > struct recv_buf *rtw_dequeue_recvbuf23a(struct rtw_queue *queue); > > void rtw_reordering_ctrl_timeout_handler23a(unsigned long pcontext); ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rtl8723au: Remove unused functions
Bhumika Goyal writes: > The functions rtw_get_oper_bw23a and rtw_get_oper_ch23aoffset are never > used anywhere in the kernel. So, remove their definition and prototype. > Grepped to find occurences. > > Signed-off-by: Bhumika Goyal > --- > drivers/staging/rtl8723au/core/rtw_wlan_util.c | 10 -- > drivers/staging/rtl8723au/include/rtw_mlme_ext.h | 2 -- > 2 files changed, 12 deletions(-) Acked-by: Jes Sorensen ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] staging/lustre/libcfs: Copy correct amount in libcfs_ioctl_getdata
>Commit b8ff756bc351 ("staging: lustre: libcfs: merge code from >libcfs_ioctl into libcfs_ioctl_getdata") introduced a problem >copying just a single pointer worth of data from userspace >instead of whole libcfs_ioctl_hdr structure. >Adjust the copying amount. > >Signed-off-by: Oleg Drokin Acked- by: James Simmons >--- > drivers/staging/lustre/lnet/libcfs/linux/linux-module.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c >b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c >index b86e937..d89f71e 100644 >--- a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c >+++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c >@@ -128,7 +128,7 @@ int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp, > struct libcfs_ioctl_hdr hdr; > int err = 0; > >- if (copy_from_user(&hdr, uhdr, sizeof(uhdr))) >+ if (copy_from_user(&hdr, uhdr, sizeof(hdr))) > return -EFAULT; > > if (hdr.ioc_version != LIBCFS_IOCTL_VERSION && >-- >2.1.0 ___ 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] staging: sm750fb: initialize max_d to maximum D value of 6
From: Colin Ian King max_d is not initialized and should be set to the largest D value of 6. Signed-off-by: Colin Ian King --- drivers/staging/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c index 95f7cae..f80ee77 100644 --- a/drivers/staging/sm750fb/ddk750_chip.c +++ b/drivers/staging/sm750fb/ddk750_chip.c @@ -306,7 +306,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll) unsigned int input, request; unsigned int tmpClock, ret; const int max_OD = 3; - int max_d; + int max_d = 6; if (getChipType() == SM750LE) { /* SM750LE don't have prgrammable PLL and M/N values to work on. -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] dma-buf: Update docs for SYNC ioctl
On 03/29/2016 06:47 AM, David Herrmann wrote: Hi On Mon, Mar 28, 2016 at 9:42 PM, Tiago Vignatti wrote: Do we have an agreement here after all? David? I need to know whether this fixup is okay to go cause I'll need to submit to Chrome OS then. Sure it is fine. The code is already there, we cannot change it. ah true. Only now that I've noticed it's already in Linus tree. Thanks anyway! Tiago ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rmda: removes a void pointer
On Fri, Mar 25, 2016 at 10:56:04PM +0100, Ben Marsh wrote: > Removes a void pointer in user_sdma.c > > Signed-off-by: Ben Marsh > --- > drivers/staging/rdma/hfi1/user_sdma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Does not apply to the tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: rtl8192e: add more information to Kconfig
On Sat, Mar 26, 2016 at 01:53:22AM -0700, deutschluz wrote: > The warnings were originating in the Kconfig file and were > essentially, asking for more information to display. A quick google > search returned the patch that separated the rtl driver from 2011 > into several separate drivers in order to comply with a certain > IEEE standard: > > http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2011-November/023070.html > > The next piece of information comes from the realtek website: > > http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PFid=9&Level=3&Conn=5&ProdID=177 > > The article above highlights features regarding IEEE 80211* standards. > > The last piece of information is the wiki on standard 802.11i: > > https://en.wikipedia.org/wiki/IEEE_802.11i-2004 > > The article states that new protocols have been defined using the > abbreviations: CCMP and TKI. > So I concluded these modules help implement those new protocols. > It goes on to say that these protocols amount to WPA2 support. > > Signed-off-by: Angel Orejel Your signed-off-by: name doesn't match your "From:" line :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: vt6655: defined some arrays as const arrays since they are not changed anywhere in code
On Sun, Mar 27, 2016 at 03:09:35PM +0300, Claudiu Beznea wrote: > This patch defines byVT3253B0_AGC4_RFMD2959[], byVT3253B0_AIROHA2230[], > byVT3253B0_UW2451[] and byVT3253B0_AGC[] arrays as const arrays > since they are not change anywhere in code. After this change > some lines broke the 80 characters per line rule. To fix this, > some changed lines were splited on two. > > Signed-off-by: Claudiu Beznea > --- > drivers/staging/vt6655/baseband.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) This does not apply to my staging-next branch at all :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Skein:move macros into appropriate header files
hi, i move macros into header files. regards, Signed-off-by: Ming Li --- drivers/staging/skein/skein_block.c | 322 drivers/staging/skein/skein_block.h | 322 +++- 2 files changed, 321 insertions(+), 323 deletions(-) diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c index 45b4732..74aa490 100644 --- a/drivers/staging/skein/skein_block.c +++ b/drivers/staging/skein/skein_block.c @@ -18,328 +18,6 @@ #include "skein_base.h" #include "skein_block.h" -#ifndef SKEIN_USE_ASM -#define SKEIN_USE_ASM (0) /* default is all C code (no ASM) */ -#endif - -#ifndef SKEIN_LOOP -#define SKEIN_LOOP 001 /* default: unroll 256 and 512, but not 1024 */ -#endif - -#define BLK_BITS(WCNT * 64) /* some useful definitions for code here */ -#define KW_TWK_BASE (0) -#define KW_KEY_BASE (3) -#define ks (kw + KW_KEY_BASE) -#define ts (kw + KW_TWK_BASE) - -#ifdef SKEIN_DEBUG -#define debug_save_tweak(ctx) \ -{ \ - ctx->h.tweak[0] = ts[0];\ - ctx->h.tweak[1] = ts[1];\ -} -#else -#define debug_save_tweak(ctx) -#endif - -#if !(SKEIN_USE_ASM & 256) -#undef RCNT -#define RCNT (SKEIN_256_ROUNDS_TOTAL / 8) -#ifdef SKEIN_LOOP /* configure how much to unroll the loop */ -#define SKEIN_UNROLL_256 (((SKEIN_LOOP) / 100) % 10) -#else -#define SKEIN_UNROLL_256 (0) -#endif - -#if SKEIN_UNROLL_256 -#if (RCNT % SKEIN_UNROLL_256) -#error "Invalid SKEIN_UNROLL_256" /* sanity check on unroll count */ -#endif -#endif -#define ROUND256(p0, p1, p2, p3, ROT, r_num) \ - do { \ -X##p0 += X##p1; \ -X##p1 = rotl_64(X##p1, ROT##_0); \ -X##p1 ^= X##p0; \ -X##p2 += X##p3; \ -X##p3 = rotl_64(X##p3, ROT##_1); \ -X##p3 ^= X##p2; \ - } while (0) - -#if SKEIN_UNROLL_256 == 0 -#define R256(p0, p1, p2, p3, ROT, r_num) /* fully unrolled */ \ - ROUND256(p0, p1, p2, p3, ROT, r_num) - -#define I256(R) \ - do {\ -/* inject the key schedule value */ \ -X0 += ks[((R) + 1) % 5]; \ -X1 += ks[((R) + 2) % 5] + ts[((R) + 1) % 3]; \ -X2 += ks[((R) + 3) % 5] + ts[((R) + 2) % 3]; \ -X3 += ks[((R) + 4) % 5] + (R) + 1;\ - } while (0) -#else -/* looping version */ -#define R256(p0, p1, p2, p3, ROT, r_num) ROUND256(p0, p1, p2, p3, ROT, r_num) - -#define I256(R) \ - do {\ -/* inject the key schedule value */ \ -X0 += ks[r + (R) + 0]; \ -X1 += ks[r + (R) + 1] + ts[r + (R) + 0];\ -X2 += ks[r + (R) + 2] + ts[r + (R) + 1];\ -X3 += ks[r + (R) + 3] + r + (R);\ -/* rotate key schedule */ \ -ks[r + (R) + 4] = ks[r + (R) - 1]; \ -ts[r + (R) + 2] = ts[r + (R) - 1]; \ - } while (0) -#endif -#define R256_8_ROUNDS(R)\ - do {\ -R256(0, 1, 2, 3, R_256_0, 8 * (R) + 1); \ -R256(0, 3, 2, 1, R_256_1, 8 * (R) + 2); \ -R256(0, 1, 2, 3, R_256_2, 8 * (R) + 3); \ -R256(0, 3, 2, 1, R_256_3, 8 * (R) + 4); \ -I256(2 * (R)); \ -R256(0, 1, 2, 3, R_256_4, 8 * (R) + 5); \ -R256(0, 3, 2, 1, R_256_5, 8 * (R) + 6); \ -R256(0, 1, 2, 3, R_256_6, 8 * (R) + 7); \ -R256(0, 3, 2, 1, R_256_7, 8 * (R) + 8); \ -I256(2 * (R) + 1); \ - } while (0) - -#define R256_UNROLL_R(NN) \ - ((SKEIN_UNROLL_256 == 0 &&\ - SKEIN_256_ROUNDS_TOTAL / 8 > (NN)) || \ - (SKEIN_UNROLL_256 > (NN))) - -#if (SKEIN_UNROLL_256 > 14) -#error "need more unrolling in skein_256_process_block" -#endif -#endif - -#if !(SKEIN_USE_ASM & 512) -#undef RCNT -#define RCNT (SKEIN_512_ROUNDS_TOTAL/8) - -#ifdef SKEIN_LOOP /* configure how much to unroll the loop */ -#define SKEIN_UNROLL_512 (((SKEIN_LOOP)/10)%10) -#else -#define SKEIN_UNROLL_512 (0) -#endif - -#if SKEIN_UNROLL_512 -#if (RCNT % SKEIN_UNROLL_512) -#error "Invalid SKEIN_UNROLL_512" /* sanity check on unroll count */ -#endif -#endif -#define ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num)\ - do {\ -X##p0 += X##p1; \ -X##p1 = rotl_64(X##p1, ROT##_0);\ -X##p1 ^= X##p0; \ -X##p2 += X##p3; \ -X##p3 = rotl_64(X##p3, ROT##_1);\ -X##p3 ^= X##p2; \ -X##p4 += X##p5; \ -X##p5 = rotl_64(X##p5, ROT##_2);\ -X##p5 ^= X##p4; \ -X##p6 += X##p7; X##p7 = rotl_64(X##p7, ROT##_3);\ -X##p7 ^= X##p6;
Re: [PATCH] Skein:move macros into appropriate header files
On Wed, Mar 30, 2016 at 08:51:42AM +0800, Ming Li wrote: > hi, i move macros into header files. > > > regards, > > > Signed-off-by: Ming Li That's a very strange changelog comment, can you please expand on what you are doing this for? You need to explain _why_ you are doing something, not what you are doing. thanks, greg k-h ___ 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? > > 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 &i->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 > + != &fc_lw_host_class.class) > + return 0; > + > + i = to_fc_lw_internal(shost->transportt); > + > + return &i->t.host_attrs.ac == cont; > +} > + > static int fc_target_match(struct attribute_container *cont, > struct device *dev) > { > @@ -2171,6 +2217,54 @@ static int fc_it_nexus_response(struct Scsi_Host > *shost, u64 nexus, int result) > return i->f->it_nexus_response(shost, nexus, result); > } > > +/** > + * fc_attach_lw_transport - light weight attach function > + * @ft: function template for optional attributes > + * > + * This attach function is to be used only for virtual FC emulators > + * which do not have a physical fabric underneath them and thus only > + * need a few attributes and no helpe