Re: [PATCH 0/4] staging: lustre: fixed some signedness warns from sparse
On Wed, Nov 22, 2017 at 08:38:27PM +0100, Stefano Manni wrote: > Fixed some signedness warnings from sparse on lustre. > > Stefano Manni (4): > staging: lustre: fixed signedness of some socklnd params > staging: lustre: fixed signedness of llite > staging: lustre: fixed signedness of lov > staging: lustre: fixed signedness of obdclass You may like to use imperative mood for your git log brief descriptions Stefano. s/fixed/fix/ For justification see Documentation/process/submitting-patches.rst. Specifically section 2 of that document. Hope this helps, Tobin. > drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h| 4 ++-- > .../staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c | 2 +- > drivers/staging/lustre/lustre/llite/dir.c | 3 ++- > drivers/staging/lustre/lustre/llite/llite_lib.c| 9 ++--- > drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 > ++ > drivers/staging/lustre/lustre/lov/lov_obd.c| 2 +- > drivers/staging/lustre/lustre/lov/lov_offset.c | 11 +++ > drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- > 8 files changed, 26 insertions(+), 21 deletions(-) > > -- > 2.5.5 > > ___ > 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: rtl8188eu: Fix private WEXT IOCTL calls
From: Ishraq Ibne AshrafCommit 8bfb36766064 ("wireless: wext: remove ndo_do_ioctl fallback") breaks private WEXT IOCTL calls of this driver as these are not invoked through ndo_do_ioctl interface anymore. As a result hostapd stops working with this driver. In this patch this problem is solved by implementing equivalent private IOCTL functions of the existing ones which are accessed via iw_handler_def interface. Signed-off-by: Ishraq Ibne Ashraf --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 1042 1 file changed, 1042 insertions(+) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index c0664dc..7503751 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -3061,6 +3061,1046 @@ static iw_handler rtw_handlers[] = { NULL, /*---hole---*/ }; +static int get_private_handler_ieee_param(struct adapter *padapter, + union iwreq_data *wrqu, + void *param) +{ + /* +* This function is expected to be called in master mode, which allows no +* power saving. So we just check hw_init_completed. +*/ + + if (!padapter->hw_init_completed) + return -EPERM; + + if (!wrqu->data.pointer) + return -EINVAL; + + /* +* Since we don't allocate memory for param in this function, we assume +* the caller of this function will properly allocate and deallocate memory +* for param. +*/ + if (copy_from_user(param, wrqu->data.pointer, wrqu->data.length)) + return -EFAULT; + + return 0; +} + +static int rtw_hostapd_sta_flush_pvt(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, + char *extra) +{ + struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); + + DBG_88E("%s\n", __func__); + + flush_all_cam_entry(padapter); // Clear CAM. + + return rtw_sta_flush(padapter); +} + +static int rtw_add_sta_pvt(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, + char *extra) +{ + int ret = 0; + struct sta_info *psta = NULL; + struct ieee_param *param = NULL; + struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); + struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct sta_priv *pstapriv = >stapriv; + + param = (struct ieee_param *)rtw_malloc(wrqu->data.length); + + if (!param) { + DBG_88E(" rtw_add_sta: ieee_param allocate fail !!!\n"); + + return -ENOMEM; + } + + ret = get_private_handler_ieee_param(padapter, wrqu, param); + + if (ret != 0) { + kfree(param); + DBG_88E(" rtw_add_sta: ieee_param get fail !!!\n"); + + return ret; + } + + DBG_88E("rtw_add_sta(aid =%d) =%pM\n", param->u.add_sta.aid, (param->sta_addr)); + + if (!check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE))) + return -EINVAL; + + if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && + param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff && + param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) + return -EINVAL; + + psta = rtw_get_stainfo(pstapriv, param->sta_addr); + if (psta) { + int flags = param->u.add_sta.flags; + psta->aid = param->u.add_sta.aid; // aid = 1~2007. + + memcpy(psta->bssrateset, param->u.add_sta.tx_supp_rates, 16); + + // Check WMM cap. + if (WLAN_STA_WME) + psta->qos_option = 1; + else + psta->qos_option = 0; + + if (pmlmepriv->qospriv.qos_option == 0) + psta->qos_option = 0; + + // Check 802.11n HT cap. + if (WLAN_STA_HT) { + psta->htpriv.ht_option = true; + psta->qos_option = 1; + memcpy(>htpriv.ht_cap, + >u.add_sta.ht_cap, + sizeof(struct ieee80211_ht_cap)); + } else { + psta->htpriv.ht_option = false; + } + + if (pmlmepriv->htpriv.ht_option == false) + psta->htpriv.ht_option = false; + + update_sta_info_apmode(padapter, psta); + } else { + ret = -ENOMEM; + } + + if (ret == 0 && (copy_to_user(wrqu->data.pointer, param, wrqu->data.length))) + ret = -EFAULT; + + return ret; +} + +static int rtw_del_sta_pvt(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, + char *extra) +{
[PATCH V2 22/29] [media] atomisp: deprecate pci_get_bus_and_slot()
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as where a PCI device is present. This restricts the device drivers to be reused for other domain numbers. Getting ready to remove pci_get_bus_and_slot() function. Since ISP always uses domain 0, hard-code it in the code when calling the replacement function pci_get_domain_bus_and_slot(). Signed-off-by: Sinan Kaya--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 2 +- drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c index 663aa91..95b9c7a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c @@ -1233,7 +1233,7 @@ static int atomisp_pci_probe(struct pci_dev *dev, isp->pdev = dev; isp->dev = >dev; isp->sw_contex.power_state = ATOM_ISP_POWER_UP; - isp->pci_root = pci_get_bus_and_slot(0, 0); + isp->pci_root = pci_get_domain_bus_and_slot(0, 0, 0); if (!isp->pci_root) { dev_err(>dev, "Unable to find PCI host\n"); return -ENODEV; diff --git a/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c b/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c index 4631b1d..51dcef57 100644 --- a/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c +++ b/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c @@ -39,7 +39,7 @@ static inline int platform_is(u8 model) static int intel_mid_msgbus_init(void) { - pci_root = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0)); + pci_root = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0)); if (!pci_root) { pr_err("%s: Error: msgbus PCI handle NULL\n", __func__); return -ENODEV; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 23/29] staging: rts5208: deprecate pci_get_bus_and_slot()
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as where a PCI device is present. This restricts the device drivers to be reused for other domain numbers. Getting ready to remove pci_get_bus_and_slot() function in favor of pci_get_domain_bus_and_slot(). Remove unused rtsx_read_pci_cfg_byte() function. Signed-off-by: Sinan Kaya--- drivers/staging/rts5208/rtsx.c | 17 - drivers/staging/rts5208/rtsx.h | 2 -- 2 files changed, 19 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 89e2cfe..70e0b86 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -275,23 +275,6 @@ static int rtsx_acquire_irq(struct rtsx_dev *dev) return 0; } -int rtsx_read_pci_cfg_byte(u8 bus, u8 dev, u8 func, u8 offset, u8 *val) -{ - struct pci_dev *pdev; - u8 data; - u8 devfn = (dev << 3) | func; - - pdev = pci_get_bus_and_slot(bus, devfn); - if (!pdev) - return -1; - - pci_read_config_byte(pdev, offset, ); - if (val) - *val = data; - - return 0; -} - #ifdef CONFIG_PM /* * power management diff --git a/drivers/staging/rts5208/rtsx.h b/drivers/staging/rts5208/rtsx.h index 575e573..62e467c 100644 --- a/drivers/staging/rts5208/rtsx.h +++ b/drivers/staging/rts5208/rtsx.h @@ -174,8 +174,6 @@ static inline void get_current_time(u8 *timeval_buf, int buf_len) /* struct scsi_cmnd transfer buffer access utilities */ enum xfer_buf_dir {TO_XFER_BUF, FROM_XFER_BUF}; -int rtsx_read_pci_cfg_byte(u8 bus, u8 dev, u8 func, u8 offset, u8 *val); - #define _MSG_TRACE #include "trace.h" -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH AUTOSEL for 4.9 04/24] staging: greybus: loopback: Fix iteration count on async path
From: Bryan O'Donoghue[ Upstream commit 44b02da39210e6dd67e39ff1f48d30c56d384240 ] Commit 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") does what it says on the tin - namely, adds support for asynchronous bi-directional loopback operations. What it neglects to do though is increment the per-connection gb->iteration_count on an asynchronous operation error. This patch fixes that omission. Fixes: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") Signed-off-by: Bryan O'Donoghue Reported-by: Mitch Tasman Reviewed-by: Johan Hovold Cc: Alex Elder Cc: Mitch Tasman Cc: greybus-...@lists.linaro.org Cc: de...@driverdev.osuosl.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/greybus/loopback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 29dc249b0c74..3c2c233c2e49 100644 --- a/drivers/staging/greybus/loopback.c +++ b/drivers/staging/greybus/loopback.c @@ -1034,8 +1034,10 @@ static int gb_loopback_fn(void *data) error = gb_loopback_async_sink(gb, size); } - if (error) + if (error) { gb->error++; + gb->iteration_count++; + } } else { /* We are effectively single threaded here */ if (type == GB_LOOPBACK_TYPE_PING) -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH AUTOSEL for 4.14 07/51] staging: greybus: loopback: Fix iteration count on async path
From: Bryan O'Donoghue[ Upstream commit 44b02da39210e6dd67e39ff1f48d30c56d384240 ] Commit 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") does what it says on the tin - namely, adds support for asynchronous bi-directional loopback operations. What it neglects to do though is increment the per-connection gb->iteration_count on an asynchronous operation error. This patch fixes that omission. Fixes: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") Signed-off-by: Bryan O'Donoghue Reported-by: Mitch Tasman Reviewed-by: Johan Hovold Cc: Alex Elder Cc: Mitch Tasman Cc: greybus-...@lists.linaro.org Cc: de...@driverdev.osuosl.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/greybus/loopback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 08e255884206..93e86798ec1c 100644 --- a/drivers/staging/greybus/loopback.c +++ b/drivers/staging/greybus/loopback.c @@ -1042,8 +1042,10 @@ static int gb_loopback_fn(void *data) else if (type == GB_LOOPBACK_TYPE_SINK) error = gb_loopback_async_sink(gb, size); - if (error) + if (error) { gb->error++; + gb->iteration_count++; + } } else { /* We are effectively single threaded here */ if (type == GB_LOOPBACK_TYPE_PING) -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: sm750fb: sm750: fixed coding style issues
On Wed, 2017-11-22 at 18:33 +0100, Patryk Kocielnik wrote: > Joe, > > Thank you for your comments! > > I did compile it beforehand and it was clean. Did I miss anything? You also have to compile it afterhand... i.e.: with your patch applied $ make allyesconfig [] $ make drivers/staging/sm750fb/ [] CC drivers/staging/sm750fb/sm750.o drivers/staging/sm750fb/sm750.c: In function ‘lynxfb_set_fbinfo’: drivers/staging/sm750fb/sm750.c:807:19: error: assignment of read-only location ‘g_fbmode[index]’ g_fbmode[index] = g_def_fbmode; ^ drivers/staging/sm750fb/sm750.c:809:20: error: assignment of read-only location ‘g_fbmode[index]’ g_fbmode[index] = g_fbmode[0]; ^ drivers/staging/sm750fb/sm750.c: In function ‘sm750fb_setup’: drivers/staging/sm750fb/sm750.c:978:17: error: assignment of read-only location ‘g_fbmode[0]’ g_fbmode[0] = opt; ^ drivers/staging/sm750fb/sm750.c:982:17: error: assignment of read-only location ‘g_fbmode[1]’ g_fbmode[1] = opt; ^ scripts/Makefile.build:310: recipe for target 'drivers/staging/sm750fb/sm750.o' failed make[1]: *** [drivers/staging/sm750fb/sm750.o] Error 1 Makefile:1674: recipe for target 'drivers/staging/sm750fb/' failed make: *** [drivers/staging/sm750fb/] Error 2 > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging/irda/net: Drop extraneous parentheses around test
Noticed during Clang builds. This drops the redundant parentheses. Cc: Samuel OrtizCc: Greg Kroah-Hartman Cc: de...@driverdev.osuosl.org Signed-off-by: Kees Cook --- drivers/staging/irda/net/irlmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/irda/net/irlmp.c b/drivers/staging/irda/net/irlmp.c index 34355061ab0b..7af618fb66c0 100644 --- a/drivers/staging/irda/net/irlmp.c +++ b/drivers/staging/irda/net/irlmp.c @@ -1668,7 +1668,7 @@ static int irlmp_slsap_inuse(__u8 slsap_sel) IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, goto errlsap;); - if ((self->slsap_sel == slsap_sel)) { + if (self->slsap_sel == slsap_sel) { pr_debug("Source LSAP selector=%02x in use\n", self->slsap_sel); goto errlsap; @@ -1693,7 +1693,7 @@ static int irlmp_slsap_inuse(__u8 slsap_sel) self = (struct lsap_cb *) hashbin_get_first(irlmp->unconnected_lsaps); while (self != NULL) { IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, goto erruncon;); - if ((self->slsap_sel == slsap_sel)) { + if (self->slsap_sel == slsap_sel) { pr_debug("Source LSAP selector=%02x in use (unconnected)\n", self->slsap_sel); goto erruncon; -- 2.7.4 -- Kees Cook Pixel Security ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging: lustre: fixed signedness of obdclass
sparse warning on obd_mount.c: warning: incorrect type in argument 5 (different signedness) expected unsigned int [usertype] *vallen got int * Signed-off-by: Stefano Manni--- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c b/drivers/staging/lustre/lustre/obdclass/obd_mount.c index 2a79a22..b0af897 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c @@ -273,7 +273,7 @@ int lustre_start_mgc(struct super_block *sb) /* IR compatibility check, only for clients */ if (lmd_is_client(lsi->lsi_lmd)) { int has_ir; - int vallen = sizeof(*data); + unsigned int vallen = sizeof(*data); __u32 *flags = >lsi_lmd->lmd_flags; rc = obd_get_info(NULL, obd->obd_self_export, -- 2.5.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/4] staging: lustre: fixed some signedness warns from sparse
Fixed some signedness warnings from sparse on lustre. Stefano Manni (4): staging: lustre: fixed signedness of some socklnd params staging: lustre: fixed signedness of llite staging: lustre: fixed signedness of lov staging: lustre: fixed signedness of obdclass drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h| 4 ++-- .../staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c | 2 +- drivers/staging/lustre/lustre/llite/dir.c | 3 ++- drivers/staging/lustre/lustre/llite/llite_lib.c| 9 ++--- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 ++ drivers/staging/lustre/lustre/lov/lov_obd.c| 2 +- drivers/staging/lustre/lustre/lov/lov_offset.c | 11 +++ drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- 8 files changed, 26 insertions(+), 21 deletions(-) -- 2.5.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging: lustre: fixed signedness of some socklnd params
sparse warnings: warning: incorrect type in assignment (different signedness) expected int *[addressable] [toplevel] [assigned] ksnd_nscheds got unsigned int static [toplevel] * warning: incorrect type in assignment (different signedness) expected int *[addressable] [toplevel] [assigned] ksnd_zc_recv got unsigned int static [toplevel] * warning: incorrect type in assignment (different signedness) expected int *[addressable] [toplevel] [assigned] ksnd_zc_recv_min_nfrags got unsigned int static [toplevel] * Signed-off-by: Stefano Manni--- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h | 4 ++-- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h index d50ebdf..474f93a 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h @@ -158,10 +158,10 @@ struct ksock_tunables { unsigned int *ksnd_zc_min_payload; /* minimum zero copy payload * size */ - int *ksnd_zc_recv;/* enable ZC receive (for + unsigned int *ksnd_zc_recv;/* enable ZC receive (for * Chelsio TOE) */ - int *ksnd_zc_recv_min_nfrags; /* minimum # of fragments to + unsigned int *ksnd_zc_recv_min_nfrags; /* minimum # of fragments to * enable ZC receive */ }; diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c index 5663a4c..2ad89ca 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c @@ -43,7 +43,7 @@ MODULE_PARM_DESC(peer_timeout, "Seconds without aliveness news to declare peer d * Number of daemons in each thread pool which is percpt, * we will estimate reasonable value based on CPUs if it's not set. */ -static unsigned int nscheds; +static int nscheds; module_param(nscheds, int, 0444); MODULE_PARM_DESC(nscheds, "# scheduler daemons in each pool while starting"); -- 2.5.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/4] staging: lustre: fixed signedness of llite
sparse warnings on dir.c: warning: incorrect type in argument 5 (different signedness) expected unsigned int [usertype] *vallen got int * sparse warnings on llite_lib.c: warning: incorrect type in argument 5 (different signedness) expected unsigned int [usertype] *vallen got int * sparse warnings on lproc_llite.c: warning: incorrect type in argument 2 (different signedness) expected int *max_mdsize got unsigned int * warning: incorrect type in argument 2 (different signedness) expected int *default_mdsize got unsigned int * warning: incorrect type in initializer (different signedness) expected int *off_count got unsigned int * warning: incorrect type in initializer (different signedness) expected int *process_count got unsigned int * Signed-off-by: Stefano Manni--- drivers/staging/lustre/lustre/llite/dir.c | 3 ++- drivers/staging/lustre/lustre/llite/llite_lib.c | 9 ++--- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 ++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 5b2e47c..ee6e8ef 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1422,7 +1422,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case LL_IOC_FLUSHCTX: return ll_flush_ctx(inode); case LL_IOC_GETOBDCOUNT: { - int count, vallen; + int count; + unsigned int vallen; struct obd_export *exp; if (copy_from_user(, (int __user *)arg, sizeof(int))) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 8666f1e..6f82bff 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -159,7 +159,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, struct md_op_data *op_data; struct lustre_md lmd; u64 valid; - int size, err, checksum; + int err, checksum; + unsigned int size; obd = class_name2obd(md); if (!obd) { @@ -571,7 +572,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, int ll_get_max_mdsize(struct ll_sb_info *sbi, int *lmmsize) { - int size, rc; + int rc; + unsigned int size; size = sizeof(*lmmsize); rc = obd_get_info(NULL, sbi->ll_dt_exp, sizeof(KEY_MAX_EASIZE), @@ -604,7 +606,8 @@ int ll_get_max_mdsize(struct ll_sb_info *sbi, int *lmmsize) */ int ll_get_default_mdsize(struct ll_sb_info *sbi, int *lmmsize) { - int size, rc; + int rc; + unsigned int size; size = sizeof(int); rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_DEFAULT_EASIZE), diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 644bea2..52dbd56 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -734,14 +734,13 @@ static ssize_t max_easize_show(struct kobject *kobj, { struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, ll_kobj); - unsigned int ealen; - int rc; + int rc, ealen; rc = ll_get_max_mdsize(sbi, ); if (rc) return rc; - return sprintf(buf, "%u\n", ealen); + return sprintf(buf, "%d\n", ealen); } LUSTRE_RO_ATTR(max_easize); @@ -763,14 +762,13 @@ static ssize_t default_easize_show(struct kobject *kobj, { struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, ll_kobj); - unsigned int ealen; - int rc; + int rc, ealen; rc = ll_get_default_mdsize(sbi, ); if (rc) return rc; - return sprintf(buf, "%u\n", ealen); + return sprintf(buf, "%d\n", ealen); } /** @@ -1479,8 +1477,8 @@ void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid, int i, cur = -1; struct ll_rw_process_info *process; struct ll_rw_process_info *offset; - int *off_count = >ll_rw_offset_entry_count; - int *process_count = >ll_offset_process_count; + unsigned int *off_count = >ll_rw_offset_entry_count; + unsigned int *process_count = >ll_offset_process_count; struct ll_rw_extents_info *io_extents = >ll_rw_extents_info; if (!sbi->ll_rw_stats_on) -- 2.5.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/4] staging: lustre: fixed signedness of lov
sparse warning on lov_obd.c: warning: incorrect type in argument 3 (different signedness) expected int *res got unsigned int [usertype] *i sparse warning on lov_offset.c: warning: incorrect type in argument 4 (different signedness) expected long long [usertype] * got unsigned long long * Signed-off-by: Stefano Manni--- drivers/staging/lustre/lustre/lov/lov_obd.c| 2 +- drivers/staging/lustre/lustre/lov/lov_offset.c | 11 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index 7ce0102..3cccd79 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -899,7 +899,7 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg, obd_str2uuid(_uuid, lustre_cfg_buf(lcfg, 1)); - rc = kstrtoint(lustre_cfg_buf(lcfg, 2), 10, indexp); + rc = kstrtouint(lustre_cfg_buf(lcfg, 2), 10, indexp); if (rc < 0) goto out; rc = kstrtoint(lustre_cfg_buf(lcfg, 3), 10, genp); diff --git a/drivers/staging/lustre/lustre/lov/lov_offset.c b/drivers/staging/lustre/lustre/lov/lov_offset.c index 3e16e64..954a01b 100644 --- a/drivers/staging/lustre/lustre/lov/lov_offset.c +++ b/drivers/staging/lustre/lustre/lov/lov_offset.c @@ -44,7 +44,7 @@ u64 lov_stripe_size(struct lov_stripe_md *lsm, u64 ost_size, int stripeno) { unsigned long ssize = lsm->lsm_stripe_size; unsigned long stripe_size; - u64 swidth; + long long swidth; u64 lov_size; int magic = lsm->lsm_magic; @@ -128,7 +128,8 @@ int lov_stripe_offset(struct lov_stripe_md *lsm, u64 lov_off, int stripeno, u64 *obdoff) { unsigned long ssize = lsm->lsm_stripe_size; - u64 stripe_off, this_stripe, swidth; + long long swidth; + u64 stripe_off, this_stripe; int magic = lsm->lsm_magic; int ret = 0; @@ -183,7 +184,8 @@ u64 lov_size_to_stripe(struct lov_stripe_md *lsm, u64 file_size, int stripeno) { unsigned long ssize = lsm->lsm_stripe_size; - u64 stripe_off, this_stripe, swidth; + long long swidth; + u64 stripe_off, this_stripe; int magic = lsm->lsm_magic; if (file_size == OBD_OBJECT_EOF) @@ -257,7 +259,8 @@ int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno, int lov_stripe_number(struct lov_stripe_md *lsm, u64 lov_off) { unsigned long ssize = lsm->lsm_stripe_size; - u64 stripe_off, swidth; + long long swidth; + u64 stripe_off; int magic = lsm->lsm_magic; lsm_op_find(magic)->lsm_stripe_by_offset(lsm, NULL, _off, ); -- 2.5.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot()
On Wed, 22 Nov 2017 12:20:47 + Alan Coxwrote: > On Wed, 2017-11-22 at 00:31 -0500, Sinan Kaya wrote: > > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 > > as > > where a PCI device is present. This restricts the device drivers to > > be > > reused for other domain numbers. > > The ISP v2 will always been in domain 0. For the ISP it doesn't matter - if it cleans up general assumptions then you have my ACK for it. Alan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: sm750fb: sm750: fixed coding style issues
Joe, Thank you for your comments! > checkpatch is not always correct. I did compile it beforehand and it was clean. Did I miss anything? Regards, Patryk On 22 November 2017 at 18:33, Patryk Kocielnikwrote: > Joe, > > Thank you for your comments! > > I did compile it beforehand and it was clean. Did I miss anything? > > Regards, > Patryk > > On 22 November 2017 at 17:03, Joe Perches wrote: >> >> On Wed, 2017-11-22 at 16:42 +0100, Patryk Kocielnik wrote: >> > Cleaned checkpatch warnings by fixing coding style issues. >> >> checkpatch is not always correct. >> >> > Signed-off-by: Patryk Kocielnik >> > --- >> > drivers/staging/sm750fb/sm750.c | 4 ++-- >> > 1 file changed, 2 insertions(+), 2 deletions(-) >> > >> > diff --git a/drivers/staging/sm750fb/sm750.c >> > b/drivers/staging/sm750fb/sm750.c >> [] >> > @@ -32,7 +32,7 @@ >> > static int g_hwcursor = 1; >> > static int g_noaccel; >> > static int g_nomtrr; >> > -static const char *g_fbmode[] = {NULL, NULL}; >> > +static const char * const g_fbmode[] = {NULL, NULL}; >> >> Make sure you compile any file modified by a patch >> _before_ submitting the proposed patch. >> >> > static const char *g_def_fbmode = "1024x768-32@60"; >> > static char *g_settings; >> > static int g_dualview; >> > @@ -749,7 +749,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, >> > int index) >> > lynx750_ext, NULL, vesa_modes, >> > }; >> > int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE}; >> > - static const char *mdb_desc[] = { >> > + static const char * const mdb_desc[] = { >> > "driver prepared modes", >> > "kernel prepared default modedb", >> > "kernel HELPERS prepared vesa_modes", > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: sm750fb: sm750: fixed coding style issues
On Wed, 2017-11-22 at 16:42 +0100, Patryk Kocielnik wrote: > Cleaned checkpatch warnings by fixing coding style issues. checkpatch is not always correct. > Signed-off-by: Patryk Kocielnik> --- > drivers/staging/sm750fb/sm750.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c [] > @@ -32,7 +32,7 @@ > static int g_hwcursor = 1; > static int g_noaccel; > static int g_nomtrr; > -static const char *g_fbmode[] = {NULL, NULL}; > +static const char * const g_fbmode[] = {NULL, NULL}; Make sure you compile any file modified by a patch _before_ submitting the proposed patch. > static const char *g_def_fbmode = "1024x768-32@60"; > static char *g_settings; > static int g_dualview; > @@ -749,7 +749,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int > index) > lynx750_ext, NULL, vesa_modes, > }; > int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE}; > - static const char *mdb_desc[] = { > + static const char * const mdb_desc[] = { > "driver prepared modes", > "kernel prepared default modedb", > "kernel HELPERS prepared vesa_modes", ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: sm750fb: sm750: fixed coding style issues
Cleaned checkpatch warnings by fixing coding style issues. Signed-off-by: Patryk Kocielnik--- drivers/staging/sm750fb/sm750.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 67207b055..41beeb9b9 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -32,7 +32,7 @@ static int g_hwcursor = 1; static int g_noaccel; static int g_nomtrr; -static const char *g_fbmode[] = {NULL, NULL}; +static const char * const g_fbmode[] = {NULL, NULL}; static const char *g_def_fbmode = "1024x768-32@60"; static char *g_settings; static int g_dualview; @@ -749,7 +749,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) lynx750_ext, NULL, vesa_modes, }; int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE}; - static const char *mdb_desc[] = { + static const char * const mdb_desc[] = { "driver prepared modes", "kernel prepared default modedb", "kernel HELPERS prepared vesa_modes", -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot()
On 11/22/2017 9:05 AM, Sinan Kaya wrote: > Hi Alex, I tried to mean Alan. Sorry about that. Apparently, I didn't have enough coffee this morning. I shouldn't touch the code for a few hours. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot()
Hi Alex, On 11/22/2017 7:20 AM, Alan Cox wrote: > On Wed, 2017-11-22 at 00:31 -0500, Sinan Kaya wrote: >> pci_get_bus_and_slot() is restrictive such that it assumes domain=0 >> as >> where a PCI device is present. This restricts the device drivers to >> be >> reused for other domain numbers. > > The ISP v2 will always been in domain 0. > Sorry, I didn't get what you mean. Do you mean that you are OK with the change (thus, can I get a reviewed by) or do you mean that I should fix the commit message? I wrote a generic commit message and applied it to all 30 patches that are more or less similar. I can certainly tailor the message a little bit for atomisp since you confirmed domain 0. > Alan > > -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 42/50] staging: most: core: fix data type
Hi Christian, On 21 November 2017 at 19:35, Christian Grommwrote: > This patch fixes the type used to manage the channels of an > registered MOST interface. > > Signed-off-by: Christian Gromm > --- > drivers/staging/most/core.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/most/core.h b/drivers/staging/most/core.h > index d6e9b87..7c44791 100644 > --- a/drivers/staging/most/core.h > +++ b/drivers/staging/most/core.h > @@ -238,7 +238,7 @@ struct most_interface { > struct module *mod; > enum most_interface_type interface; > const char *description; > - int num_channels; > + unsigned int num_channels; This change is independent of the series. Can you decouple this from the series and send it as separate patch? > struct most_channel_capability *channel_vector; > int (*configure)(struct most_interface *iface, int channel_idx, > struct most_channel_config *channel_config); > -- > 2.7.4 > > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel Regards, PrasannaKumar ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 41/50] staging: most: usb: clear functional stall on OUT endpoint
Hi Christian, On 21 November 2017 at 19:35, Christian Grommwrote: > For the MOST packet channel there are two dedicated USB endpoints. But > internally the hardware has actually one channel for data forwarding from > and to MOST. To have the hardware clean up its state machine correctly in > case of an error, both USB pipes need to be reset. This patch triggers the > host to also clear the OUT endpoint's halt condition in case an IN endpoint > has signaled to be stalled. > > Signed-off-by: Christian Gromm > --- > drivers/staging/most/usb/usb.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c > index acd0a36..49f5495 100644 > --- a/drivers/staging/most/usb/usb.c > +++ b/drivers/staging/most/usb/usb.c > @@ -815,6 +815,21 @@ static void wq_clear_halt(struct work_struct *wq_obj) > if (usb_clear_halt(mdev->usb_device, pipe)) > dev_warn(>usb_device->dev, "Failed to reset > endpoint.\n"); > > + /* If the functional Stall condition has been set on an > +* asynchronous rx channel, we need to clear the tx channel > +* too, since the hardware runs its clean-up sequence on both > +* channels, as they are physically one on the network. > +* > +* The USB interface that exposes the asynchronous channels > +* contains always two endpoints, and two only. > +*/ > + if (mdev->conf[channel].data_type == MOST_CH_ASYNC && > + mdev->conf[channel].direction == MOST_CH_RX) { > + int peer = 1 - channel; > + int snd_pipe = usb_sndbulkpipe(mdev->usb_device, > + mdev->ep_address[peer]); > + usb_clear_halt(mdev->usb_device, snd_pipe); > + } > mdev->is_channel_healthy[channel] = true; > most_resume_enqueue(>iface, channel); > mutex_unlock(>io_mutex); > -- > 2.7.4 > > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel This fix is independent of the series. Can you decouple this and post as a separate patch? This fix can go in even if the series takes time to go in. Regards, PrasannaKumar ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 20/50] staging: most: core: remove struct device
Hi Christian, On 21 November 2017 at 19:34, Christian Grommwrote: > This patch takes out the struct device of struct most_aim, because it is > not needed. Patch 9 adds struct device to struct most_aim and this patch removes it. I think not adding struct device to struct most_aim in patch 9 is a better way to go. Regards, PrasannaKumar ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 47/50] staging: most: core: remove class generation
Hi Christian, On 21 November 2017 at 19:35, Christian Grommwrote: > This patch stops the core from generating a module owned class and > registering it with the kernel. It is needed, because there is no need for Should be "It is not needed". Not is missing. > a default MOST class to be present in the kernel. > > Signed-off-by: Christian Gromm > --- > drivers/staging/most/core.c | 13 + > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c > index 72f1526..d03ff97 100644 > --- a/drivers/staging/most/core.c > +++ b/drivers/staging/most/core.c > @@ -39,7 +39,6 @@ static struct mostcore { > struct device dev; > struct device_driver drv; > struct bus_type bus; > - struct class *class; > struct list_head comp_list; > } mc; > > @@ -1564,17 +1563,10 @@ static int __init most_init(void) > pr_info("Cannot register most bus\n"); > return err; > } > - mc.class = class_create(THIS_MODULE, "most"); > - if (IS_ERR(mc.class)) { > - pr_info("No udev support.\n"); > - err = PTR_ERR(mc.class); > - goto exit_bus; > - } > - > err = driver_register(); > if (err) { > pr_info("Cannot register core driver\n"); > - goto exit_class; > + goto exit_bus; > } > mc.dev.init_name = "most_bus"; > mc.dev.release = release_most_sub; > @@ -1587,8 +1579,6 @@ static int __init most_init(void) > > exit_driver: > driver_unregister(); > -exit_class: > - class_destroy(mc.class); > exit_bus: > bus_unregister(); > return err; > @@ -1599,7 +1589,6 @@ static void __exit most_exit(void) > pr_info("exit core module\n"); > device_unregister(); > driver_unregister(); > - class_destroy(mc.class); > bus_unregister(); > ida_destroy(_id); > } > -- > 2.7.4 > > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel Regards, PrasannaKumar ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 26/50] staging: most: rename struct most_aim
Hi Christian, On 21 November 2017 at 19:35, Christian Grommwrote: > The designator of a module that proivdes means to interface userspace is > called an AIM. Since this name seems to be unappropiate, this kind of > moduels are going to be referred to as componetns. This is done because > such modules function as components to enhance the core with new features. > This patch renames the struct most_aim to core_component. Using the word component does not provide much info either. Appreciate if you can find a better name than core_component. Regards, PrasannaKumar ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/50] staging: most: rework driver architecture and fix defects
Hi Christian, On 21 November 2017 at 19:34, Christian Grommwrote: > This patch set fixes bugs and integrates the driver to the kernel's device > model by revising its architecture. Part of this change is rearranging the > directory layout, renaming of files and folders and thereby creating a > clean driver structure. > > > Andrey Shvetsov (2): > staging: most: update driver usage file > staging: most: core: fix list traversing > > Christian Gromm (48): > staging: most: move core files > staging: most: cdev: rename module > staging: most: i2c: rename module > staging: most: dim2: rename module > staging: most: net: rename module > staging: most: sound: rename module > staging: most: usb: rename module > staging: most: video: rename module > staging: most: remove proprietary kobjects > staging: most: core: remove function get_channel_by_iface > staging: most: core: add a match function for the bus > staging: most: core: encapsulate code in function > staging: most: core: rename structure > staging: most: core: rename struct most_c_aim_obj to pipe > staging: most: core: rename struct memeber > staging: most: core: rename members aim* of struct most_channel > staging: most: core: use structure to pack driver specific data > staging: most: core: track aim modules with linked list > staging: most: core: fix sysfs attribute management > staging: most: core: remove struct device > staging: most: core: rename function > staging: most: core: replace struct most_inst_obj > staging: most: core: put channel name in struct most_channel > staging: most: core: remove context pointer > staging: most: usb: remove pointer initialization > staging: most: rename struct most_aim > staging: most: rename functions to register a driver with most_core > staging: most: core: rename mod_list > staging: most: core: rename aim variables > staging: most: core: rename function link_channel_to_aim > staging: most: net: remove aim designators > staging: most: sound: remove aim designator > staging: most: video: remove aim designators > staging: most: cdev: rename struct aim_channel > staging: most: cdev: rename variable aim_devno > staging: most: cdev: rename class instance aim_class > staging: most: cdev: rename variable cdev_aim > staging: most: fix comment sections > staging: most: core: denote modules as components > staging: most: core: fix formatting > staging: most: usb: clear functional stall on OUT endpoint > staging: most: core: fix data type > staging: most: core: check value returned by match function > staging: most: cdev: replace function prefix > staging: most: cdev: bundle module variables in structure > staging: most: core: remove class generation > staging: most: add ABI documentation > staging: most: usb: fix show/store function names > > .../most/Documentation/ABI/sysfs-bus-most.txt | 313 > .../staging/most/Documentation/driver_usage.txt| 192 +- > drivers/staging/most/Kconfig | 27 +- > drivers/staging/most/Makefile |5 +- > drivers/staging/most/aim-cdev/Makefile |2 +- > drivers/staging/most/aim-network/Makefile |2 +- > drivers/staging/most/aim-sound/Makefile|2 +- > drivers/staging/most/aim-v4l2/Makefile |2 +- > drivers/staging/most/{aim-cdev => cdev}/Kconfig|6 +- > drivers/staging/most/cdev/Makefile |4 + > drivers/staging/most/{aim-cdev => cdev}/cdev.c | 186 +- > drivers/staging/most/core.c| 1609 > .../staging/most/{mostcore/mostcore.h => core.h} | 69 +- > drivers/staging/most/{hdm-dim2 => dim2}/Kconfig|6 +- > drivers/staging/most/dim2/Makefile |4 + > .../most/{hdm-dim2/dim2_hdm.c => dim2/dim2.c} | 31 +- > .../most/{hdm-dim2/dim2_hdm.h => dim2/dim2.h} |2 +- > .../most/{hdm-dim2/dim2_errors.h => dim2/errors.h} |2 +- > .../most/{hdm-dim2/dim2_hal.c => dim2/hal.c} |8 +- > .../most/{hdm-dim2/dim2_hal.h => dim2/hal.h} |4 +- > .../most/{hdm-dim2/dim2_reg.h => dim2/reg.h} |2 +- > drivers/staging/most/dim2/sysfs.c | 55 + > .../most/{hdm-dim2/dim2_sysfs.h => dim2/sysfs.h} |8 +- > drivers/staging/most/hdm-dim2/Makefile |2 +- > drivers/staging/most/hdm-dim2/dim2_sysfs.c | 115 -- > drivers/staging/most/hdm-i2c/Makefile |2 +- > drivers/staging/most/hdm-usb/Makefile |2 +- > drivers/staging/most/{hdm-i2c => i2c}/Kconfig |6 +- > drivers/staging/most/i2c/Makefile |4 + > .../staging/most/{hdm-i2c/hdm_i2c.c => i2c/i2c.c} | 11 +- > drivers/staging/most/mostcore/Kconfig | 14 - > drivers/staging/most/mostcore/Makefile |3 - >
Re: [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot()
On Wed, 2017-11-22 at 00:31 -0500, Sinan Kaya wrote: > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 > as > where a PCI device is present. This restricts the device drivers to > be > reused for other domain numbers. The ISP v2 will always been in domain 0. Alan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: comedi: adl_pci9118: fixed some parentheses coding style issue
Thank you. I'll keep that in mind next time! On Wed, Nov 22, 2017 at 11:28:51AM +1100, Tobin C. Harding wrote: > You may like to limit the git log brief description to 50 characters > (this is going to be hard with such a long pre-fix though :) > > Brief description should be in imperative mood i.e 'Fix foo' instead of > 'fixed foo'. > > On Tue, Nov 21, 2017 at 05:17:53PM -0200, Guilherme Tadashi Maeoka wrote: > > Fixed some code style issues. > > This is not descriptive enough. You may like to read > > Documentation/process/submitting-patches.rst > > for tips on writing git log messages. > > > Signed-off-by: Guilherme Tadashi Maeoka> > --- > > drivers/staging/comedi/drivers/adl_pci9118.c | 12 ++-- > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c > > b/drivers/staging/comedi/drivers/adl_pci9118.c > > index 1cc9b7ef1ff9..53f13994ac94 100644 > > --- a/drivers/staging/comedi/drivers/adl_pci9118.c > > +++ b/drivers/staging/comedi/drivers/adl_pci9118.c > > @@ -947,7 +947,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, > > struct comedi_subdevice *s) > > if (devpriv->master) { > > devpriv->usedma = 1; > > if ((cmd->flags & CMDF_WAKE_EOS) && > > - (cmd->scan_end_arg == 1)) { > > + cmd->scan_end_arg == 1) { > > The code was easier to read before this change IMO. > > > if (cmd->convert_src == TRIG_NOW) > > devpriv->ai_add_back = 1; > > if (cmd->convert_src == TRIG_TIMER) { > > @@ -960,7 +960,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, > > struct comedi_subdevice *s) > > } > > if ((cmd->flags & CMDF_WAKE_EOS) && > > (cmd->scan_end_arg & 1) && > > - (cmd->scan_end_arg > 1)) { > > + cmd->scan_end_arg > 1) { > > if (cmd->scan_begin_src == TRIG_FOLLOW) { > > devpriv->usedma = 0; > > /* > > @@ -983,7 +983,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, > > struct comedi_subdevice *s) > > */ > > if (cmd->convert_src == TRIG_NOW && devpriv->softsshdelay) { > > devpriv->ai_add_front = 2; > > - if ((devpriv->usedma == 1) && (devpriv->ai_add_back == 1)) { > > + if (devpriv->usedma == 1 && devpriv->ai_add_back == 1) { > > Likewise, this is not making the code easier to read. > > > /* move it to front */ > > devpriv->ai_add_front++; > > devpriv->ai_add_back = 0; > > @@ -1185,7 +1185,7 @@ static int pci9118_ai_cmdtest(struct comedi_device > > *dev, > > (!(cmd->convert_src & (TRIG_TIMER | TRIG_NOW > > err |= -EINVAL; > > > > - if ((cmd->scan_begin_src == TRIG_FOLLOW) && > > + if (cmd->scan_begin_src == TRIG_FOLLOW && > > (!(cmd->convert_src & (TRIG_TIMER | TRIG_EXT > > err |= -EINVAL; > > > > @@ -1210,8 +1210,8 @@ static int pci9118_ai_cmdtest(struct comedi_device > > *dev, > > if (cmd->scan_begin_src & (TRIG_FOLLOW | TRIG_EXT)) > > err |= comedi_check_trigger_arg_is(>scan_begin_arg, 0); > > > > - if ((cmd->scan_begin_src == TRIG_TIMER) && > > - (cmd->convert_src == TRIG_TIMER) && (cmd->scan_end_arg == 1)) { > > + if (cmd->scan_begin_src == TRIG_TIMER && > > + cmd->convert_src == TRIG_TIMER && cmd->scan_end_arg == 1) { > > cmd->scan_begin_src = TRIG_FOLLOW; > > cmd->convert_arg = cmd->scan_begin_arg; > > cmd->scan_begin_arg = 0; > > Remember, we are writing code for developers to read. It should be as > easy to parse as possible. > > Hope this helps, > Tobin. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: fsl-mc: use 32bits to support 64K size mc-portals
On 11/22/2017 09:48 AM, Bharat Bhushan wrote: > As per APIs each mc-portal is of 64K size while currently > 16bits (type u16) is used to store size of mc-portal. > In these cases upper bit of portal size gets truncated. > > Signed-off-by: Bharat Bhushan> --- Ok, so just to clarify this fixes the case where size is equal (or maybe larger in the future) to 0x1. Acked-By: Laurentiu Tudor --- Best Regards, Laurentiu ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 10/50] staging: most: core: remove function get_channel_by_iface
On Tue, Nov 21, 2017 at 3:04 PM, Christian Grommwrote: > This patch removes the function get_channel_by_iface that walks a list of > all registered interfaces and returns a pointer to a channel when matched. > Instead the private field of the interface structure is used to directly > access the channel via the id. The patch is needed to remove unnecessary > list traversing. get_channel_by_iface causes a lot of list traversions when trying to match the channel. If we store our most instance in the interfaces private pointer, we can access the channel directly. The search is now no longer necessary and get_channel_by_iface can be removed. Same story, none of the, I feel, awkward "This patch does blabla" style text. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 24/30] staging: rts5208: deprecate pci_get_bus_and_slot()
On Wed, Nov 22, 2017 at 12:31:09AM -0500, Sinan Kaya wrote: > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > where a PCI device is present. This restricts the device drivers to be > reused for other domain numbers. > > Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't > extract the domain number. Other places, use the actual domain number from > the device. > > Signed-off-by: Sinan Kaya> --- > drivers/staging/rts5208/rtsx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c > index 89e2cfe..13b14fe 100644 > --- a/drivers/staging/rts5208/rtsx.c > +++ b/drivers/staging/rts5208/rtsx.c > @@ -281,7 +281,7 @@ int rtsx_read_pci_cfg_byte(u8 bus, u8 dev, u8 func, u8 > offset, u8 *val) > u8 data; > u8 devfn = (dev << 3) | func; > > - pdev = pci_get_bus_and_slot(bus, devfn); > + pdev = pci_get_domain_bus_and_slot(0, bus, devfn); Ugh, this whole function should go away, but it's good enough for now, I'll queue it up after -rc1 is out. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] staging: fsl-mc: use 32bits to support 64K size mc-portals
As per APIs each mc-portal is of 64K size while currently 16bits (type u16) is used to store size of mc-portal. In these cases upper bit of portal size gets truncated. Signed-off-by: Bharat Bhushan--- v2->v3: - v2 patch: https://patchwork.kernel.org/patch/10067661/ - Changes patch subject and description v1->v2: - v1 patch: https://patchwork.kernel.org/patch/10067657/ - replace uin32_t to u32 in patch subject/description drivers/staging/fsl-mc/include/mc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl-mc/include/mc.h b/drivers/staging/fsl-mc/include/mc.h index aafe63a..2cf15b0 100644 --- a/drivers/staging/fsl-mc/include/mc.h +++ b/drivers/staging/fsl-mc/include/mc.h @@ -325,7 +325,7 @@ static inline void mc_cmd_read_api_version(struct mc_command *cmd, struct fsl_mc_io { struct device *dev; u16 flags; - u16 portal_size; + u32 portal_size; phys_addr_t portal_phys_addr; void __iomem *portal_virt_addr; struct fsl_mc_device *dpmcp_dev; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel